Linux logname command

Updated: 06/16/2017 by Computer Hope

About logname

Prints the login name of the current user.

logname syntax

logname [OPTION]

Options

--help Display a help message, and exit.
--version Display version information and exit.

logname examples

logname

Returns the name of the currently logged in user.

env — Report the value of environment variables.
login — Begin a session on a system.