What Is The Difference Between The Whoami And Logname Commands?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The whoami command displays the current user‘s username, while the logname command displays the username that is associated with the current login session. The two commands can display different usernames when run from different terminals or when running on a computer shared with multiple users.