Discova
Back to cards
Operating systems1 min readWikipedia, updated 28 November 2026

Logname

Standard UNIX utility

In computer software, logname (stands for Login Name) is a program in Unix and Unix-like operating 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).

History

The logname system call and command appeared for the first time in UNIX System III. The author of the version of logname bundled in GNU coreutils is unknown. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.

Usage

Adapted from the Wikipedia article, CC BY-SA 4.0. Continue on Wikipedia

Go deeper

Ideas this article links to.