Whoami command

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to: navigation, search
  • The whoami command displays the user login name of the current session.
  • Type the following command at a shell promot:
whoami

Sample outputs:

vivek
  • The id command provides the same information on screen:
id -un