MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
which commands gives the no of recently logged in users?
A
who
B
who | wc-w
C
whoami | wc-l
D
who | wc-l
Explanation: 

Detailed explanation-1: -w command – Shows information about the users currently on the machine, and their processes. who command – Display information about users who are currently logged in.

Detailed explanation-2: -You need to use last command to find last time user logged into the Linux or Unix system. This command displays last logins of users and ttys.

Detailed explanation-3: -The who command is used to display the users logged into the system. The who command related to the w command that is used to display information about the users currently on the machine and their processes.

Detailed explanation-4: -Get the user name and process of logged in user using who and users command. who command is used to get the list of the usernames who are currently logged in. Output of the who command contains the following columns: user name, tty number, date and time, machine address.

Detailed explanation-5: -Users command is used to print the user name who are all currently logged in the current host.

There is 1 question to complete.