In computer software, logname (stands for Login Name) is a program in Unix and Unix-likeoperating systems that prints the name of the user who is currently logged in on the terminal. It usually corresponds to the LOGNAME variable in the system-state environment (but this variable could have been modified).
$ logname--help
Usage: logname [OPTION]Print the name of the current user. --help display this help and exit --version output version information and exit