作者myCrystal ( )
看板Linux
标题Re: [问题] 提示目前所在目录
时间Mon May 26 15:10:40 2008
※ 引述《MOONRAKER (㊣乌笨秃,又笨又秃)》之铭言:
: ※ 引述《myCrystal ( )》之铭言:
: : 我是用Ubuntu 8。
: : 除了一开始create 的帐号,在console会有显示目前路径以外,
: : 其他useradd的帐号 不管进入那一个directory,都只有一个$当作提示
: : 想请问一下 有办法让他像root那样,显示完整目前path吗?
: : 谢谢
: 看你的$PS1设定什麽,在/etc/profile里面照着设定就好了。
:
请问
我把profile改成
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1="[\u@\h:\w]\$ "
fi
fi
fi
umask 022
是改红色line,结果
提示字元却变成 : [\u@\h:\w]$
这是怎麽回事?
thanks
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.113.166.28