Ubuntu 命令列路徑太長如何縮短? - Linux

Table of Contents


(己爬過文, 但找不到答案)
在 Ubuntu 下命令列預設是將絕對路徑全部顯示, 例如:
root@xxx-desktop:~/dir1/dir2/dir3/dir4/dir5#

相同的情形在 Fedora 8 下, 是長這樣:
[root@localhost dir5]

請問有無方法縮短命令列的路徑顯示方式, 把它弄成像 Fedora 8 的樣子??


--

All Comments

Edward Lewis avatarEdward Lewis2008-11-02
man bash可以查到,鳥哥網站裡的bash shell也有講
Zanna avatarZanna2008-11-06
簡而言之:~/.bashrc最後加上 PS1='[\u@\h \W]\$ '
Caroline avatarCaroline2008-11-12
$ echo $PS1 然後把\w改成\W 再給PS1....我都這樣做@@"