Changing your shell prompt

The prompt environmental variable is PS1. This is configured in the .bashrc file. For example, the following sets the prompt:

[alice@localhost]: export PS1="[\u@\h]\w $"

There are a number of control sequences defined inside the PS1 variable: for example, \u is the username, \h is the hostname of the system and \w is the current directory. The bash man page has many more - search the bash man page for PS1 for a complete list.