Multiple choice technology operating systems

Which command is used to Print the current user id and name (`id -un')

  1. who

  2. whoami

  3. whologgedin

  4. user

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The whoami command prints the effective username of the current user, matching the behavior of id -un. In contrast, who displays a list of all currently logged-in users, while whologgedin and user are not standard Unix commands for retrieving the current active user.