[SunHELP] root user "prompt" , current dir as prompt in bourne shell

rmolugurk at yahoo.com rmolugurk at yahoo.com
Thu Jun 13 10:06:53 CDT 2002


 Hi,

1.
  I would like to know where is the setting for root
user's shell prompt in solaris. I login to the machine
console as root.

for non-root users it is in /etc/profile and
$HOME/.profile as PS1. 

But the root user is not getting the prompt from these
files.

2. I use Bourne shell for a user called xx.  Is there
a way in this shell to get prompt which displays
"current directory". An example is : If change to a
dir called test from my home dir /export/home/xx. I
need the prompt to change to /export/home/xx/test.

 with my /etc/profile settings as follows, I only get
my home dir in the prompt for user xx. I didn't have
any settings in $HOME/.profile for this user xx.

PWD=`pwd`
HOST=`hostname`
PS1="$HOST:$PWD>"



More information about the SunHELP mailing list