Re: [問題] 請問沒辦法顯示目前在哪個目錄下,要怎묠…
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 9 之 9 篇):
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章