linux下shell顯示-bash-4.1#不顯示路徑解決方法

在linux shell中不顯示路徑了,顯示爲-bash-4.1#用起來很不方便。

如何改爲顯示路徑的shell呢?

步驟如下:

vim ~/.bash_profile

(不用管.bash_profile這個文件有幾個,自己新建一個也是可以的)

在最後加上
export PS1='[\u@\h \W]\$'

然後執行
source ~/.bash_profile

這樣shell就可以顯示路徑了。

轉載自:http://blog.sina.com.cn/s/blog_406127500102v1p9.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章