logname(S) 6 January 1993 logname(S) Name logname - return login name of user Syntax cc ... -lPW char *logname () Description The logname function returns a pointer to the null-terminated login name; it extracts the LOGNAME environment variable from the user's environment. Files /etc/profile Notes The return values point to static data whose content is overwritten by each call. This method of determining a login name is subject to forgery. See also env(C), environ(M), getenv(S), login(M), profile(M) Standards conformance logname is conformant with: AT&T SVID Issue 2, but has been withdrawn from XPG3.