Re: How to set the prompt os it shows current working directory



Actually, in your example, below, "~" is the current working directory.
"~" is the shortcut for your home directory.

How do I set the prompt in RHEL 4 so that it shows the current working
directory when you login and whenever you change directories. When I
initially log in it doesn't show me the home directory of the oracle
account. When I cd to /u01 it shows that in the prompt and then when I
cd to /u01/app it shows that but when I then cd to oracle it doesn't
show it.

I have this command in my .bash_profile is this correct?

export PS1="[\h:\w]$ "

Thanks,
Dave Martini
LLNL

[root@~]# su - oracle
[ct:~]$
[ct:~]$ pwd
/u01/app/oracle
[ct:~]$ cd /u01
[ct:/u01]$ cd app
[ct:/u01/app]$ cd oracle
[ct:~]$
[ct:~]$
[ct:~]$
[ct:~]$ more .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
export PS1="[\h:\w]$ "
[ct:~]$

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@xxxxxxxxxxxxxxxxx

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • How to set the prompt os it shows current working directory
    ... How do I set the prompt in RHEL 4 so that it shows the current working directory when you login and whenever you change directories. ... When I cd to /u01 it shows that in the prompt and then when I cd to /u01/app it shows that but when I then cd to oracle it doesn't show it. ...
    (RedHat)
  • Re: [SLE] Hacked?
    ... >non-root user was created and used successfully for about a week. ... AS root we reset the password and can now login on a character ... we tried removing this use and his home directory along with all ... I use rsync nightly to backup my entire home directory into a ...
    (SuSE)
  • user login error on CDE
    ... The DT messaging system could not be started ... Select Failsafe Session from the login screen's option menu and login ... Check to see any magic cookie related error messages in these locations: ... -F on home directory, so I shutdown nfs server, unshared the home directory. ...
    (SunManagers)
  • Re: Changing account home directory in Solaris 10
    ... the account home directory stated: ... There is no problem when the acc login. ... # At present there isn't a 'files' backend for netgroup; ...
    (comp.unix.solaris)
  • Gnome failing on first login
    ... I am setting up authentication using LDAP. ... The home directory is ... most Gnome related directories and files are missing. ... Login to the user and immediately log out. ...
    (Fedora)