Answered step by step
Verified Expert Solution
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:
Type who in the command line, and press Enter.
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 : or both, which show you are logged on locally. Users who are logged on remotely will have lines that begin with tty such as tty tty and so on
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 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::
sjones tty::
rsanchez tty: 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 minutes. The word old on rsanchezs line indicates no activity in the past hours.
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.
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
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started