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. kill -9 PID
B. service stop
C. pkill service
D. systemctl stop service
Answer: Option D
Solution (By JKExamLibrary)
On systemd-based Linux, systemctl stop is used to stop services; older sysvinit used service command.

This question belongs to: Computer Operating Systems

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1 Report Error
Which Linux command is used to copy files or directories?
A. mv
B. cp
C. rsync
D. scp

Correct Answer: Option B


Explanation:
cp copies files/directories; mv moves/renames; rsync is for synchronization; scp is secure copy over network.

This question belongs to: Computer Operating Systems
Question #2 Report Error
Which component of an operating system is responsible for managing the allocation and deallocation of main memory blocks to active applications?
A. Process Scheduler
B. Memory Manager
C. I/O Spooler
D. File System Manager

Correct Answer: Option B


Explanation:
The memory management subsystem tracks memory allocation status, allocating chunks to active processes and reclaiming them upon task completion.

This question belongs to: Computer Operating Systems
Question #3 Report Error
What is the purpose of the Android 'FragmentManager'?
A. To handle fragment transactions
B. Both A and C
C. To manage fragments (UI components) within an activity
D. To manage activities

Correct Answer: Option B


Explanation:
FragmentManager handles adding, removing, and replacing fragments, as well as managing back stack.

This question belongs to: Computer Operating Systems