Solaris Advanced User's Guide

Bourne, Bourne Again, Korn, and Z Shells

In the Bourne, Bourne Again, Korn, and Z shells, use the PS1 command to redefine your command prompt. The following are three examples:

Type any of the previous examples to change your current command prompt. This change applies until you change your command prompt again or log out.

If you want to make your changes more permanent, add one of the previous examples (or a prompt of your own creation) to your user profile file. If you follow this guideline, the prompt you specify appears each time you log in in or start a new shell.