Using who


Using who

In addition to date and uptime, there is another Unix command that can help you manage your system. This command is called who. This is not the same as whoami, a command you learned earlier in this book. The whoami command returns only the username of the person currently logged in and accessing the shell prompt. By using who, you can see more information.

Unix is a multiuser system; this means that there can be many different users logged in at any given time. Therefore, it's important to know how to see who is also logged in to your system, and you can do this by using the who command. Use this command as follows:

 >who rob     pts/0 April 7, 2005 (console) mary    pts/1 April 7, 2005 jane    pts/2 April 7, 2005 admin   pts/3 April 7, 2005 

This example shows that there are currently four users logged in to the system. who returns the username of each user who is logged in, as well as the name of the controlling terminal, the date and time that the users logged in, and sometimes the IP address from which the users are connected. Each version of Unix or Linux may produce different output, so visit your local man pages for more information on the who command.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net