Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Specification  





3 Usage  





4 Output  





5 See also  





6 References  





7 External links  














who (Unix)






Беларуская
Čeština
Deutsch
Ελληνικά
Español
Français

Italiano
עברית
Magyar

Polski
Português
Română
Русский

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


who
Developer(s)AT&T Bell Laboratories
Initial releaseNovember 3, 1971; 52 years ago (1971-11-03)
Operating systemMultics, Unix, Unix-like, Plan 9
PlatformCross-platform
TypeCommand
Licensecoreutils: GPLv3+

The standard Unix command who displays a list of users who are currently logged into the computer.

The who command is related to the command w, which provides the same information but also displays additional data and statistics.

History[edit]

Awho command that displays the names of users logged in was first implemented within Multics.[1] Later, it appeared in Version 1 Unix[2] and became part of the X/Open Portability Guide since issue 2 of 1987. It was inherited into the first version of POSIX.1 and the Single Unix Specification.[3]

The version of who bundled in GNU coreutils was written by Joseph Arceneaux, David MacKenzie, and Michael Stone.[4]

Specification[edit]

The Single UNIX Specification (SUS) specifies that who should list information about accessible users. The XSI extension also specifies that the data of the username, terminal, login time, process ID, and time since last activity occurred on the terminal, furthermore, an alternate system database used for user information can be specified as an optional argument to who.

The command can be invoked with the arguments am ioram I (so it is invoked as who am iorwho am I), showing information about the current terminal only (see the command tty and the -m option below, of which this invocation is equivalent).

Usage[edit]

The SUS without extensions only specifies the following -m, -T, and -u options, all other options are specified in the XSI extension.

-a, process the system database used for user information with the -b, -d, -l, -p, -r, -t, -T and -u.
-b, show time when system was last rebooted
-d, show zombie processes and details
-H, show column headers
-l, show terminals where a user can log in
-m, show information about the current terminal only
-p, show active processes
-q, quick format, show only names and the number of all users logged on, disables all other options; equivalent to users command line utility
-r, show runlevel of the init process.
-s, (default) show only name, terminal, and time details
-t, show when system clock was last changed
-T, show details of each terminal in a standard format (see note in Examples section)
-u, show idle time; XSI shows users logged in and displays information whether the terminal has been used recently or not

Other Unix and Unix-like operating systems may add extra options. GNU who includes a -i option behaving similarly to -u and a -w option displaying whether the user listed accepts messages (the SUS displays this when -T is specified), yet GNU who and BSD who both omit a number of the above options (such as -a, -b, -d, and others); GNU who instead uses -l to perform DNS lookups on hostnames listed.

Output[edit]

The SUS without extensions specifies that the output format is to be "implementation-defined". The XSI extension specifies a format, but notes that it is not fully specified; delimiters and field lengths are not precisely specified. Thus, the format of the output differs considerably among Unix implementations.

See also[edit]

References[edit]

  • ^ who(1) – FreeBSD General Commands Manual
  • ^ who – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Group
  • ^ who(1) – Linux User Manual – User Commands
  • External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Who_(Unix)&oldid=1148635790"

    Categories: 
    Multics commands
    Unix user management and support-related utilities
    Standard Unix programs
    Unix SUS2008 utilities
    Plan 9 commands
     



    This page was last edited on 7 April 2023, at 11:30 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki