Which command in Linux is used to display the currently logged-in user accounts and terminal details? MCQ with Answer and Explanation

Which command in Linux is used to display the currently logged-in user accounts and terminal details?
A. uname
B. id
C. pwd
D. who
Answer: Option D
Solution (By JKSSB Mock Tests)
The 'who' command queries system accounting data to display information about users currently logged into the operating system session.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Operating Systems Questions

Question #1
In Linux, the 'df' command with '-h' option shows:
A. Disk space usage in human-readable format
B. File system type
C. Mount options
D. Inode usage

Correct Answer: Option A


Explanation:
df -h displays file system usage in GB/MB, making it easier to read.

This question belongs to: Computer Operating Systems
Question #2
In Windows, what does the 'whoami' command display?
A. The current user's username
B. The IP address
C. The system uptime
D. The computer name

Correct Answer: Option A


Explanation:
whoami returns the domain and username of the current logged-in user.

This question belongs to: Computer Operating Systems
Question #3
Which Linux command is used to mount a file system at boot?
A. systemctl mount
B. mount -a
C. Entries in /etc/fstab
D. All of the above

Correct Answer: Option D


Explanation:
/etc/fstab defines mount points; mount -a mounts all entries in fstab; systemd can also handle mount units.

This question belongs to: Computer Operating Systems