Multiple choice technology operating systems

Which command used to print current user id

  1. who

  2. whoami

  3. ami

  4. others

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

The whoami command displays the username of the currently logged-in user. The who command shows who is logged into the system, not just the current user. 'ami' is not a valid Unix command.