Multiple choice technology operating systems

current user -> test, base user -> root which of the following is correct

  1. whoami will display root

  2. who am i will display test

  3. who am i will display root

  4. None of the above

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

When using su or sudo to switch users, 'whoami' displays the current effective user (test in this case - the user you switched to). 'who am i' displays the original login user (root - the base user who initiated the session). The question's wording is confusing but the claimed answer correctly identifies that 'who am i' shows the original/root user.