whoami Command

Purpose

Displays your login name.

Syntax

whoami

Description

The whoami command displays your login name. The whoami command also works when you have root authority since it does not examine the /etc/utmp file.

Files

Table 1. Files
Item Description
/etc/passwd Contains user IDs.