MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
I want to show a list of users logged in for a specific host. Which command will I use?
A
who
B
whoami
C
users
D
users-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: -Use w command to see logged in users in Linux Just type a single letter command in the terminal and it will show the currently logged users in Linux.

Detailed explanation-3: -The whoami command allows Linux users to see the currently logged-in user. The output displays the username of the effective user in the current shell. Additionally, whoami is useful in bash scripting to show who is running the script.

Detailed explanation-4: -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.

Detailed explanation-5: -In Linux operating systems, there is special, single letter command called w that helps you to find who is logged on and what they are doing in the system. This is the most commonly used command line tool to display the information about the users currently on the server, and their processes.

There is 1 question to complete.