首先进入到etc目录,编辑profile文件vim profile登录后复制然后在最后一行加上:export PS1='[\u@\h $PWD]\$'登录后复制保存之后执行:source /etc/profile登录后复制推荐教程:linux教程