Multiple choice technology operating systems

Which command can be used to view the current users login name?

  1. logname

  2. who

  3. whos

  4. ps

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

logname is a Unix command that specifically displays the login name of the current user. While who shows all logged-in users and ps shows running processes, logname is the most direct command for viewing just your own login name.