![]() example of logname command | |
Initial release | 1982; 43 years ago (1982) |
---|---|
Operating system | Unix andUnix-like |
Platform | Cross-platform |
Type | Command |
License | GNU GPL v3 |
Incomputer software,logname (stands forLogin Name) is a program inUnix andUnix-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).
Thelognamesystem call and command appeared for the first time inUNIX System III. The author of the version oflogname
bundled inGNUcoreutils is unknown.[1] The command is available as a separate package forMicrosoft Windows as part of theUnxUtils collection ofnativeWin32ports of common GNU Unix-like utilities.[2]
$logname--helpUsage: logname [OPTION]Print the name of the current user. --help display this help and exit --version output version information and exit
logname
: return the user's login name – Shell and Utilities Reference,The Single UNIX Specification, Version 4 fromThe Open Group