Linux for Programmers and Users

[Page 139 (continued)]

4.10. Identifying Shells: whoami

Let's say that you come across a vacated system and there's a shell prompt on the screen. Obviously someone was working on the Linux system and forgot to log off. You wonder curiously who that person was. To solve the mystery, you can use the whoami utility, which displays the owner of a shell (Figure 4-22).

Figure 4-22. Description of the whoami command.

Utility: whoami

Displays the owner of a shell.

For example, when I executed whoami at my system, I saw this:

$ whoami glass $ _

Категории