logname

Print current login name

SYNTAX
      logname

DESCRIPTION

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'.

Related commands:

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 NT commands:

SET USERNAME - Display current login name
NET CONFIG WORKSTATION - Display current login name
NET USER - Manage user account details
NET - ACCOUNTS, GROUP, LOCALGROUP



Back to the Top

Simon Sheppard
SS64.com