1. Home
  2. Linux
  3. Linux User and Group
  4. Linux – whoami

Linux – whoami

Linux whoami command

Linux whoami command is used to get current logged in username. This command is most helpful with Shell scripting to find if the current user is root or not.

Example:

$ whoami

Output:

rahul
Was this article helpful to you? Yes 1 No
Advertisement