Os|linux在主机名后自动显示当前路径

vi /etc/profile 添加: export PS1='\n\e[1; 37m[\e[m\e[1; 31m\u\e[m\e[1; 31m@\e[m\e[1; 31m\h\e[m \e[4m`pwd`\e[m\e[1; 37m]\e[m\e[1; 36m\e[m\n\$' export PROMPT_COMMAND='echo -ne "\033]0; ${USER}@${HOSTNAME%%.*}"; echo -ne "\007"'
效果 [root@primary /opt/oracle/oracle/product/10.2.0/db_1/network/admin]
#

    推荐阅读