[root@hf-01 ~]# echo $PS1
[\u@\h \W]\$
[root@hf-01 ~]# cd /etc/sysconfig/network-scripts/
[root@hf-01 network-scripts]# PS1='[\u@\h \w]\$'
[root@hf-01 /etc/sysconfig/network-scripts]#
[root@hf-01 ~]# cd 123/
[root@hf-01 ~/123]# cd /tmp/
[root@hf-01 /tmp]#
这是一个全局路径
[root@hf-01 /tmp]# PS1='\u@\h \w\$'
root@hf-01 /tmp#
root@hf-01 /tmp# PS1='<\u@\h \w> \$'
<root@hf-01 /tmp> #
普通用户是 $号,root用户是# 号
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '