Changes

How Do I: A Linux Q&A

1,191 bytes added, 08:30, 13 September 2007
The following lines were added (+) and removed (-):
== [CHANGE BASH CUSTOM PROMPT] ==-------------------------------------------------------------------------------he appearance of the prompt is governed by the shell variable PS1. The default prompt is customized on many linux distributions.  It is sometimes customized differently for root and regular users. Redhat Linux default prompt:  PS1='[\u@\h \W]\$ ' Trustix Linux default prompt:  PS1='\u@\h \w\$ 'To see how the current prompt is set echo $PS1Set prompt style on login, edit .bash_profile (or equivalent) example: PS1='root@\h \w\$ ' export PS1  * PS1 - The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. The default value is \s-\v\$ .* PS2 - The value of this parameter is expanded as with PS1 and used as the secondary prompt string. The default is >* PS3 - The value of this parameter is used as the prompt for the select command* PS4 - The value of this parameter is expanded as with PS1 and the value is printed before each command bash displays during an execution trace. The first character of PS4 is replicated multiple times, as necessary, to indicate multiple levels of indirection. The default is +
Bureaucrat, administrator
16,221
edits