{
    "mode": "info",
    "parameter": "who",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/who/json",
    "generated": "2026-11-10T05:59:18Z",
    "sections": {
        "File: coreutils.info,  Node: who invocation,  Prev: users invocation,  Up: User information": {
            "content": "",
            "subsections": [
                {
                    "name": "20.6 'who': Print who is currently logged in",
                    "content": "'who' prints information about users who are currently logged on.\nSynopsis:\n\nwho [OPTION] [FILE] [am i]\n\nIf given no non-option arguments, 'who' prints the following\ninformation for each user currently logged on: login name, terminal\nline, login time, and remote hostname or X display.\n\nIf given one non-option argument, 'who' uses that instead of a\ndefault system-maintained file (often '/var/run/utmp' or '/etc/utmp') as\nthe name of the file containing the record of users logged on.\n'/var/log/wtmp' is commonly given as an argument to 'who' to look at who\nhas previously logged on.\n\nIf given two non-option arguments, 'who' prints only the entry for\nthe user running it (determined from its standard input), preceded by\nthe hostname.  Traditionally, the two arguments given are 'am i', as in\n'who am i'.\n\nTimestamps are listed according to the time zone rules specified by\nthe 'TZ' environment variable, or by the system default rules if 'TZ' is\nnot set.  *Note Specifying the Time Zone with 'TZ': (libc)TZ Variable.\n\nThe program accepts the following options.  Also see *note Common\noptions::.\n\n'-a'\n'--all'\nSame as '-b -d --login -p -r -t -T -u'.\n\n'-b'\n'--boot'\nPrint the date and time of last system boot.\n\n'-d'\n'--dead'\nPrint information corresponding to dead processes.\n\n'-H'\n'--heading'\nPrint a line of column headings.\n\n'-l'\n'--login'\nList only the entries that correspond to processes via which the\nsystem is waiting for a user to login.  The user name is always\n'LOGIN'.\n\n'--lookup'\nAttempt to canonicalize hostnames found in utmp through a DNS\nlookup.  This is not the default because it can cause significant\ndelays on systems with automatic dial-up internet access.\n\n'-m'\nSame as 'who am i'.\n\n'-p'\n'--process'\nList active processes spawned by init.\n\n'-q'\n'--count'\nPrint only the login names and the number of users logged on.\nOverrides all other options.\n\n'-r'\n'--runlevel'\nPrint the current (and maybe previous) run-level of the init\nprocess.\n\n'-s'\nIgnored; for compatibility with other versions of 'who'.\n\n'-t'\n'--time'\nPrint last system clock change.\n\n'-u'\nAfter the login time, print the number of hours and minutes that\nthe user has been idle.  '.' means the user was active in the last\nminute.  'old' means the user has been idle for more than 24 hours.\n\n'-w'\n'-T'\n'--mesg'\n'--message'\n'--writable'\nAfter each login name print a character indicating the user's\nmessage status:\n\n'+' allowing 'write' messages\n'-' disallowing 'write' messages\n'?' cannot find terminal device\n\nThe 'who' command is installed only on platforms with the POSIX\n'<utmpx.h>' include file or equivalent, so portable scripts should not\nrely on its existence on non-POSIX platforms.\n\nAn exit status of zero indicates success, and a nonzero value\nindicates failure.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}