Linux logname Command
The Linux logname command is used to display the user name.
Run the logname command, and it will display the name of the current user.
Syntax
logname [--help][--version]
Parameters:
- --help Online help.
- --vesion Display version information.
Example
Display information about the login account:
# logname
root
Linux Command Reference