Question: What is the difference between the whoami and logname commands?

  1. whoami and logname provide the same information.
  2. whoami tells who are you currently, and logname tells who you were when you logged in initially.
  3. logname specifies the name of the login log file, and whoami prints the logged in username.
  4. whoami shows you who logged in as initially, and logname shows who are you currently.

Answer: The correct answer of the above question is Option B:whoami tells who are you currently, and logname tells who you were when you logged in initially.