Changing bash prompt

From Linux Shell Scripting Tutorial - A Beginner's handbook
Revision as of 10:54, 20 October 2009 by Admin (talk | contribs)
Jump to navigation Jump to search

← Using aliasesHomeSetting shell options →

  • Task: You need to customize your bash prompt by editing PS1 variable.
  • Display, your current prompt setting, enter:
echo $PS1

Sample outputs:

\u@\h:\w\$
  • For testing purpose set PS1 as follows and notice the changes:
PS1='your wish is my command : '

Sample outputs:

vivek@vivek-desktop:~$ PS1='your wish is my command : '
your wish is my command : 

← Using aliasesHomeSetting shell options →