Which Linux command is used to stop a running service (e.g., Apache)? MCQ with Answer and Explanation

Which Linux command is used to stop a running service (e.g., Apache)?
A. systemctl stop service
B. service stop
C. pkill service
D. kill -9 PID
Answer: Option A
Solution (By JKSSB Mock Tests)
On systemd-based Linux, systemctl stop is used to stop services; older sysvinit used service command.

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1
What is the main difference between a process and a thread?
A. A process has its own memory space, while threads share memory within a process
B. Processes are scheduled, threads are not
C. There is no difference
D. Threads are independent, while processes are not

Correct Answer: Option A


Explanation:
Processes are independent with separate memory; threads are lighter, sharing the same memory space and resources of the parent process.

This question belongs to: Computer Operating Systems
Question #2
What is the function of the Windows 'chkdsk' command?
A. Defragments the hard disk
B. Checks the file system and disk for errors and repairs them
C. Cleans up temporary files
D. Converts FAT to NTFS

Correct Answer: Option B


Explanation:
chkdsk (Check Disk) scans the file system and disk sectors for errors and attempts to fix them.

This question belongs to: Computer Operating Systems
Question #3
What is the function of the Android 'WifiManager'?
A. To manage Wi-Fi connectivity, scan networks, and configure connections
B. To manage network preferences
C. To manage Bluetooth
D. To manage cellular data

Correct Answer: Option A


Explanation:
WifiManager provides APIs to enable/disable Wi-Fi, scan for networks, and connect to access points.

This question belongs to: Computer Operating Systems