Linux command prompt can be changed according to personal preferences, modify the value of PS1;
Under Ubuntu, if only the individual users under the modification of ~/.profile file, all users of the unified modified/etc/profile;
Join:
Export ps1= ' [/[email protected]/h/w/]/$ '
where/u displays the current user account
/h Displays the current host name
/w Displays the current path (uppercase W is a relative path, and lowercase w is an absolute path)
/$ display ' $ ' symbol
PS1: Settings for the prompt
PS1 (is the number 1 instead of the letter L), each version of Bash's PS1 variable within the special symbol may be a little different, you can first man bash.
/d: Represents a date in the format weekday month date, for example: "Mon-1"
/h: The full host name. For example: My machine name is: Fc4.linux, then this name is Fc4.linux
/h: Only the first name of the host is taken, as in the example above, then Fc4,.linux is omitted
/T: Display time in 24-hour format, e.g. HH:MM:SS
/T: Display time in 12-hour format
/A: Display time in 24-hour format: hh:mm
/u: Current user's account name
Version information for/v:bash
/w: The full working directory name. Home directory will be replaced by ~
/w: Use basename to get the working directory name, so only the last directory is listed
/#: The first few commands issued
/$: Prompt character, if root, Prompt is: #, normal user is: $
For Ubuntu to modify the. bashrc file in $home, add ps1= "/w >" and so on, you can modify the prompt.
Original address: http://blog.csdn.net/humorrat/article/details/5615167
Command prompt modification of Linux