在/etc/profile 和 ~/.bashrc 或者直接在用户的.bash_profile中添加下列代码:
export PS1="[/u@/h pwd
]$"或export PS1=‘[\u@\h \W]$’
添加机器名显示
PS1='[\033[0m]\u@\h pwd
]$ ’
在/etc/profile 和 ~/.bashrc 或者直接在用户的.bash_profile中添加下列代码:
export PS1="[/u@/h pwd
]$"或export PS1=‘[\u@\h \W]$’
添加机器名显示
PS1='[\033[0m]\u@\h pwd
]$ ’