Linux / Operating System Questions

Anic_an_engineer
0

 

Linux / Operating System Questions 


Q26. Which command is used to show currently logged-in users?

Correct Answer: who
Explanation:
The who command displays:

  • Logged-in usernames

  • Terminal

  • Login time

Example:

who

Q27. Which command is used to change file permissions?

Correct Answer: chmod
Explanation:
chmod modifies read (r), write (w), execute (x) permissions.

Example:

chmod 755 filename

Q28. Which command is used to change ownership of a file?

Correct Answer: chown
Explanation:
Changes owner and group of files.

Example:

chown user:group file

Q29. Which file system is commonly used in Linux?

Correct Answer: ext4
Explanation:
ext4 is:

  • Journaling file system

  • Faster & more reliable

  • Default in most Linux distros


Q30. Which command is used to display disk space usage?

Correct Answer: df
Explanation:
Shows available and used disk space.

Example:

df -h

Q31. Which command is used to display directory size?

Correct Answer: du
Explanation:
du shows disk usage of files/directories.

Example:

du -sh /var/log

Q32. Which command is used to display running processes?

Correct Answer: ps
Explanation:
ps lists active processes.

Example:

ps -ef

Q33. Which command continuously monitors system processes?

Correct Answer: top
Explanation:
top provides:

  • Real-time CPU usage

  • Memory usage

  • Process load


Q34. Which Linux directory contains configuration files?

Correct Answer: /etc
Explanation:
System-wide configuration files are stored in /etc.

Examples:

  • /etc/passwd

  • /etc/fstab

  • /etc/ssh/sshd_config


Q35. Which file stores user account information?

Correct Answer: /etc/passwd
Explanation:
Contains:

  • Username

  • UID

  • GID

  • Home directory

  • Shell


Q36. Which file stores encrypted user passwords?

Correct Answer: /etc/shadow
Explanation:
Passwords are stored securely (hashed) in /etc/shadow, readable only by root.


Q37. Which command is used to switch user?

Correct Answer: su
Explanation:
Switches to another user (default root).

Example:

su -

Q38. Which command is used to shutdown the system immediately?

Correct Answer: shutdown -h now
Explanation:
Safely halts the system.


Q39. Which command displays kernel version?

Correct Answer: uname -r
Explanation:
Shows currently running kernel version.


Q40. Which scheduling utility is used in Linux?

Correct Answer: cron
Explanation:
Cron schedules recurring jobs.

Example:

crontab -e

Q41. Which file controls cron jobs?

Correct Answer: crontab
Explanation:
Each user has a crontab file defining scheduled tasks.


Q42. Which command searches text inside files?

Correct Answer: grep
Explanation:
Used for pattern matching.

Example:

grep error /var/log/syslog

Q43. Which command displays file content page-wise?

Correct Answer: less
Explanation:
Allows scrolling forward & backward.


Q44. Which runlevel is multi-user mode without GUI?

Correct Answer: Runlevel 3
Explanation:
Runlevels:

  • 3 → Multi-user CLI

  • 5 → GUI mode


Q45. Which runlevel shuts down the system?

Correct Answer: Runlevel 0
Explanation:
Runlevel 0 = System halt.

Tags:

Post a Comment

0 Comments

Please Select Embedded Mode To show the Comment System.*

3/related/default