============================= Setting the BASH shell prompt ============================= -IAN! idallen@idallen.ca Since you now have three Unix machines in your lives (Knoppix, ACADUNIX, and the new Course Linux Server), you may be uncertain about which machine is receiving your keystrokes. You can change the shell prompt string to include the machine name by changing the contents of environment variable PS1. The BASH shell uses special escape sequences in the prompt string to mean things such as your userid ("\u"), your host name ("\h"), and the last part of the pathname that is your current working directory ("\W"). (See the BASH man page for lots of other goodies.) In the following sequence of commands issued on ACADUNIX, you can see the original PS1 contents and the new contents and how each affects the prompt being displayed: $ bash bash-2.04$ hostname acadunix bash-2.04$ bash-2.04$ echo "$PS1" \s-\v\$ bash-2.04$ bash-2.04$ PS1='[\u@\h \W]\$ ' [alleni@acadunix alleni]$ [alleni@acadunix alleni]$ As with any variable, to make this change permanent across logout/login, you must add the line that sets PS1 to one of your login files (.profile or .bash_profile) and also export the PS1 variable.