Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The who command is valuable for determining who is currently logged in to a system. In this project, you try out the who command using

The who command is valuable for determining who is currently logged in to a system. In this project, you try out the who command using several options.
To use the who command to determine who is logged in to the system:
1. Type who in the command line, and press Enter.
2. You see a list showing user names, the terminals (lines) they are using, and the dates and the times they logged in. For example, for your connection you will likely see the lines pts/1, :0, or both, which show you are logged on locally. Users who are logged on remotely will have lines that begin with tty, such as tty1, tty2, and so on.
3. To display a line of column headings with the who commands output, type who -H and press Enter.
If any current users are logged in from a remote host, the COMMENT column shows the name of the host.4. Idle time is the amount of time that has elapsed with no activity in a users session. Type who -u and press Enter to see each users idle time. The following is a sample listing of who information. (The final value is the process ID, but you might also see a
comment after the process ID.)
mpalmer pts/12009-11-2208:154230(:0.0)
sjones tty12009-11-2207:564229(:29.0)
rsanchez tty32009-11-2208:214238 old
The output shows that the person logged in as mpalmer has been active in the last minute. The account sjones has no activity in the last 29 minutes. The word old on rsanchezs line indicates no activity in the past 24 hours.
5. If you want to use multiple options on the same command line, type them all after a single hyphen. For example, type who -uH and press Enter to see a list of users with idle times and column headings.
6. Type who -q and press Enter to see a quick list of current users. You see a list simi- lar to the following, which shows only login names and the total number of users on the system.
mpalmer sjones rsanchez
# users=3
7. To determine which terminal you are using or what time you logged in, type who am i in the command line, and press Enter (see Figure 1-15). What information appears? If you are not certain, type who am i -H and press Enter to view column headings. (Another option is to type whoami as one word, which only displays your account name or user ID, in case you are not certain which account you are cur- rently using; this option is often used by system administrators. Also try entering who mom likes to see what you find out.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions