1. 程式人生 > >CentOS 7.4 shell 不顯示當前用戶和路徑的問題

CentOS 7.4 shell 不顯示當前用戶和路徑的問題

export art 文件 自己 刪除 nbsp file centos .net

步驟如下: vim ~/.bash_profile (不用管.bash_profile這個文件有幾個,自己新建一個也是可以的) 在最後加上 export PS1=‘[\u@\h \W]\$‘ 然後執行 source ~/.bash_profile 這樣shell就可以顯示路徑了 你也可能是不小心刪除了/home下的文件,參考這裏:http://blog.csdn.net/yhao2014/article/details/46237483

CentOS 7.4 shell 不顯示當前用戶和路徑的問題