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 username associated with the current effective user ID. It's equivalent to 'id -un' which shows the username. The 'who' command shows all logged-in users, not just the current user.