next up previous contents index
Next: The Profile Files Up: Environment Variables Previous: A Summary of

Changing Your Command Prompt

As noted previously, the default command prompt in the Bourne shell family is the $ (dollar sign) and in the C shell family is the % (percent sign). You can change these by setting new values to PS1 (Bourne) or prompt (C shell). For example to change from the $ symbol as the command line prompt to the machine name as the new prompt in a Bourne shell --

 
               		  $ PS1 =  "Bravo:"

Bravo: echo test

test

Bravo:

Other constructs commonly found in command prompts are all or part of the current working directory and the command sequence number. Using the C shell, examples of these would look like --

 
               		  set prompt="$cwd%"

set prompt="!"



Alan Silverman
Wed Apr 12 16:54:02 METDST 1995