Linux logname command

Linux 命令大全Linux Command Collection

The Linux logname command is used to display the user name.

Execute the logname command, it will display the current user's name.

Syntax

logname [--help][--version]

Parameters:

  • --help  Online help.
  • --vesion  Display version information.

Examples

Display information about the logged-in account:

# logname 
root

Linux 命令大全Linux Command Collection

Other Extensions