# Linux commands: whoami

> Learn how the Linux whoami command prints the user name currently logged in to your terminal session, and how it differs from the more detailed who am i.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-09-17 | Topics: [CLI](https://flaviocopes.com/tags/cli/) | Canonical: https://flaviocopes.com/linux-command-whoami/

Type `whoami` to print the user name currently logged in to the terminal session:

![Terminal window showing the whoami command executed, returning flavio as the current user](https://flaviocopes.com/images/linux-command-whoami/Screen_Shot_2020-09-03_at_18.08.05.png)

> Note: this is different from the `who am i` command, which prints more information

> The `whoami` command works on Linux, macOS, WSL, and anywhere you have a UNIX environment
