作者giacch (giacch)
看板FreeBSD
标题Re: [问题] 请问没办法显示目前在哪个目录下,要怎묠…
时间Tue Dec 4 02:54:11 2007
※ 引述《Gracybaby (对爱情没痛觉)》之铭言:
: 请问一下喔
: 我看不太懂耶
: [33m\]....这些是要加的字or不是?
: PS1=後面的内容可以再写一遍吗?
: 还有我有个同事跟我说可以改/root/.profile
: 加上一行export PS1='\h:\w\$ '
: 可是我加了没用耶
: 加上了之後要再重开机才能work吗?
bash 请加到 ~/.bash_profile 或 ~/.bashrc 里...
(以下节录自 man bash)
\w the current working directory
\h the hostname
\$ if the effective UID is 0, a #, otherwise a $
~/.bash_profile
The personal initialization file, executed for
login shells
~/.bashrc
The individual per-interactive-shell startup file
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 222.250.222.221