bibinbhanu
asked on
Shell prompt Not displaying properly
Hi,
I am having a slight problem , the shell prompt when i log in does not show the user name or the dir i am presently in , it only show me
bash-2.05b$
Thank you,
Bibin
I am having a slight problem , the shell prompt when i log in does not show the user name or the dir i am presently in , it only show me
bash-2.05b$
Thank you,
Bibin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am not able to find my .bash_profile
try
ls -la
if you dont have > .bash_profile
then you can create one
vi or emacs .bash_profile
( in you home directory btw )
ls -la
if you dont have > .bash_profile
then you can create one
vi or emacs .bash_profile
( in you home directory btw )
ASKER
could anybody send me a sample bash_profile , I am using Red hat 9
there is a sample .bash_profile at
http://www.ccl.net/cca/software/UNIX/oracle/RH6.2-CDPACK/files/bash_profile.shtml
http://www.hccfl.edu/pollock/AUnix1/BashProfile.htm
you need not have such bigones.. just set the values which are necessary to you
http://www.ccl.net/cca/software/UNIX/oracle/RH6.2-CDPACK/files/bash_profile.shtml
http://www.hccfl.edu/pollock/AUnix1/BashProfile.htm
you need not have such bigones.. just set the values which are necessary to you
have a look like root to /etc/passwd
what is your deafault shell you should have there somethhing like this:
root:x:0:0:root:/root:/bin /bash
or check your user account last field separated witn ':' is your default shell
also have a look here:
-------------------
/etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
PATH="/usr/local/bin:/usr/ bin:/bin:/ usr/bin/X1 1:/usr/gam es"
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
export PATH PS1
umask 022
for mor info have a look to man page:
# man bash
-------------------------- -
luxana
what is your deafault shell you should have there somethhing like this:
root:x:0:0:root:/root:/bin
or check your user account last field separated witn ':' is your default shell
also have a look here:
-------------------
/etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
PATH="/usr/local/bin:/usr/
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
export PATH PS1
umask 022
for mor info have a look to man page:
# man bash
--------------------------
luxana
ASKER
Thanks for all the help ,
I figured out that I had tried to install a pdf as root which probably was a spy ware or something and ehich may ahve deleted the profile.
I created a new account and copied all the necessary file to my dir.
.bashrc
.bash_profile
etc...
:)
Thank you
Bibin
I figured out that I had tried to install a pdf as root which probably was a spy ware or something and ehich may ahve deleted the profile.
I created a new account and copied all the necessary file to my dir.
.bashrc
.bash_profile
etc...
:)
Thank you
Bibin
PS1 variable
you can put
export PS1="\w> "
in your .bash_profile to have the current working directory on the prompt
similarly
\u for username etc