The syntax you use to change your command prompt depends on whether you are using the Bourne, Korn or C shell.
For the Bourne or Korn shells, you redefine your command prompt with the PS1 command. The following are three examples:
PS1=": " PS1="`hostname`: " PS1="`hostname`{`id`}}: " |
The first example sets the prompt to a colon (:), followed by a space.
The second example creates a prompt consisting of your machine name followed by a colon and a space.
The third example sets the prompt to your machine name, followed by your login name in braces {}, a colon, and a space.
Type any of the examples above to change your current command prompt. The prompt will remain until you change it again, or logout.
If you want to make your changes more permanent, add one of the above examples (or a prompt of your own creation) to your .profile file. If you do this, the prompt you specify will appear each time you login in or start a new shell.
For the C shell, you personalize your command prompt with the set prompt command. The following are three examples:
set prompt="% " set prompt="`hostname`\!: " set prompt="`hostname`{`id`}}: " |
The first example sets the prompt to the percent sign, followed by a space.
The second example creates a prompt consisting of your machine name followed by the history number of the command (hostname1, hostname2, hostname3, and so on).
The third example sets the prompt to your machine name, followed by your login name in braces, a colon, and a space.
Type any of the examples above to change your current command prompt. The prompt will remain until you change it again, or logout.
If you want to make your changes more permanent, add one of the above examples (or a prompt of your own creation) to your .cshrc file. If you do this, the prompt you specify will appear each time you login in or start a new shell.