How to Change the User's Prompt |
Question: "When I log in, I see myusername on ce.uml.edu> How do I change this prompt to a %? " Answer: You need to edit your initialization file, which depends on the shell you are using. |
As part
of the log-in sequence, all the shells read a global
default initialization file that contains environment
variables and commands before running the user
account private shell initialization file, which is
in the user's home directory. In the users home directory there are the following initialization files:
The Bourne, Korn and
Bash shells all read the /etc/profile first, then the
user's local .profile. If you are using one
of these shells as your login shell, you would edit
your .profile.
The C shell uses the /etc/csh.login file for initialization before reading the user's .cshrc and .login files. If you are using the C shell, you would edit the .login file to change your prompt. Use VI or emacs to edit the file. Change the line set prompt="$user on `hostname`> " to set prompt="%". |