\ D: indicates the date in the format of weekdaymonthdate. for example, & quot; SunSep18 & quot; \ H: The Complete host name. For example, my machine name is redhat. in linux, the name is fc4.linux \ h: only the first name of the host. in the preceding example, the name is redhat. linux ,. linux is omitted \ t: The display time is in the 24-hour format, such as: HH: MM: SS \ T: Display
\ D: represents the date, in the format of weekday month date, for example: "Sun Sep 18"
\ H: complete host name. For example, if my machine name is redhat. linux, this name is fc4.linux
\ H: only the first name of the host. for example, redhat. linux and. linux are omitted.
\ T: The display time is in the 24-hour format, for example, HH: MM: SS.
\ T: The display time is in the 12-hour format.
\ A: The display time is in the 24-hour format: HH: MM.
\ U: account name of the current user
\ V: BASH version information
\ W: complete working directory name. In the home directory ~ Replace
\ W: use basename to get the working directory name. Therefore, only the last Directory is listed.
#: Commands issued
\ $: The prompt character. if it is root, the prompt is: #, and the normal user is: $
\ N: linefeed
Modify the format as needed.
Then source/etc/bashrc takes effect.
[Root @ localhost/mydisk/eclispe_workspace/normandy] # echo $ PS1
[\ U @ \ h \ w] \ $
[Root @ localhost/mydisk/eclispe_workspace/normandy] #