vim ~/.bashrc ##添加以下信息 export PS1=‘[\u@\h `pwd`]$ ‘
然后保存退出
source ~/.bashrc 或者关机重新启动即可
linux显示完整目录
原文:https://www.cnblogs.com/students/p/8821541.html