Print current login name


Prints the calling user's name, as found in the file`/var/run/utmp', and exits with a status of 0.

If there is no `/var/run/utmp' entry for the calling process, `logname' prints an error message and exits with a status of 1.

The only options are `--help' and `--version'.

"What passes for identity in America is a series of myths about one's heroic ancestors" ~ James Baldwin


env - Display, set, or remove environment variables
groups - Print group names a user is in
hostname - Print or set system name
id - Print user and group id's
uname - Print system information
users - Print login names of users currently logged in
who - Print who is currently logged in
whoami - Print the current user id and name (`id -un')
Equivalent Windows command: ECHO %username%

Copyright © SS64.com 1999-2017
Some rights reserved