[Previous] [Contents] [Next]

logname

Return user's login name (POSIX)

Syntax:

logname

Options:

None.

Description:

The logname utility writes the user's login name to standard output. If the user doesn't have an entry in the password file, a diagnostic message is written to standard error and logname exits with an exit status greater than zero.

Files:

/etc/passwd
Password file; contains valid userids on the system.

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

id, who


[Previous] [Contents] [Next]