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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux