if [ "`id -u`" -eq 0 ]; then
#PS1='# '
PS1='[\e[0;32m\u @ \w \e[m \A #\!]\n \# '
else
#PS1='$ '
PS1='[\e[0;32m\u @ \w \e[m \A #\!]\n \$ '
看起來會像這樣
參考資料:
BASH Shell change the color of my shell prompt under Linux or UNIX
How to: Change / Setup bash custom prompt (PS1)
0 comments:
Post a Comment