Reg: Setting hostname as shell name

April 5, 2010 at 01:48:29
Specs: Windows Vista
can any one halp me how t o set
hostname as shell name
example:
if i log in root it shows
#
then i type bash means it shows
bash#
in the bash i want to display my hostname as permanent
for that i put the entry in
/etc/profile
PS1="hostname@root"
but its not displaying ...

whather the entry is corrcet r i want to give it in kernnel

pls help me

regards
anand


See More: Reg: Setting hostname as shell name

Report •

#1
April 5, 2010 at 07:06:22
Use command substitution to capture the output of the hostname command and then export PS1:

PS1=`hostname`'@root '
export PS1


Report •
Related Solutions


Ask Question