Analysis of the command prompt format in Linux
Generally, the command prompt format is "[user name @ Computer Name Current Directory] command prompt". Of course, you can modify it, that is, edit ~ /. Bashrc file, find the PS1 definition, in which PS1 is the variable that defines the command prompt.
The meanings of each symbol are as follows:
\ U is the current Login User Name
\ H is the name of the current computer
\ H is the full name of the current computer domain name
\ W is the current directory
\ W is the last entry of the current directory, that is, basenmae
\ $ The average user is $, and the root user is #
\ T is the current time, in the 24-hour format
\ T is the current time, in 12-hour format
\ @ Display AM or PM
\ D current date
\ V is a bash version.
\ V is the bash release version.
\ S is the shell Name
\! Is the history number of the bash command
\ J is the job serial number
\ L is the terminal name of shell.
The above \ W is shorter than \ w