Originally Posted by sathyguy
how/where to see the environment variable ps1?
you will see a string containing some modifiers like \u \h and so on. Depending on the value of this variable, the command prompt will be dinamically updated every time you change user and/or directory. For example on a RHEL4 installation I have:
this tell to build the prompt using: open square bracket, username, @, hostname, current directory without absolute path, closed square bracket and a litteral $.
Regarding the different output of the "who am i" commands, take in mind that whoami is the same as id -un
, whereas who am i is the command who with two special arguments. The different output can be related to the way you logged in as user oracle. What is it?
For example, by using the su
command you retain the id of the original user and whoami acts accordingly.