Process control is the way Linux manages running programs, allowing you to start, stop, pause, and monitor them.
Click to reveal answer
beginner
Why does Linux need to manage running programs?
Linux manages running programs to keep the system organized, ensure resources like CPU and memory are shared fairly, and to prevent conflicts or crashes.
Click to reveal answer
beginner
What command can you use to see running processes in Linux?
You can use the ps command to list running processes and see details like process ID and status.
Click to reveal answer
beginner
How does process control help when a program freezes?
Process control lets you stop or kill a frozen program so it doesn’t block your system or other programs.
Click to reveal answer
intermediate
What is the role of signals in process control?
Signals are messages sent to running programs to tell them to stop, pause, continue, or perform other actions.
Click to reveal answer
What does process control in Linux primarily manage?
AFile storage
BRunning programs
CNetwork connections
DUser accounts
✗ Incorrect
Process control manages running programs to keep the system organized and efficient.
Which command shows currently running processes?
Als
Bmkdir
Ccd
Dps
✗ Incorrect
The 'ps' command lists running processes and their details.
What happens if a program freezes and process control is not used?
AThe system may slow down or crash
BThe program runs faster
CThe program deletes itself
DNothing happens
✗ Incorrect
A frozen program can block resources, slowing or crashing the system if not managed.
What is a signal in process control?
AA message to a program
BA network packet
CA type of file
DA user login
✗ Incorrect
Signals are messages sent to programs to control their behavior.
Which command can stop a running program?
Aecho
Bls
Ckill
Dpwd
✗ Incorrect
The 'kill' command sends signals to stop or terminate programs.
Explain why process control is important for managing running programs in Linux.
Think about what happens if many programs run without control.
You got /4 concepts.
Describe how signals help in process control.
Signals are like instructions sent to programs.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of process control in Linux?
easy
A. To manage running programs by starting, stopping, or pausing them
B. To install new software packages
C. To change the screen resolution
D. To create new user accounts
Solution
Step 1: Understand process control basics
Process control is about managing programs that are currently running on the system.
Step 2: Identify the correct purpose
Starting, stopping, and pausing programs are key actions in process control.
Final Answer:
To manage running programs by starting, stopping, or pausing them -> Option A
Quick Check:
Process control = Manage running programs [OK]
Hint: Process control means managing running programs [OK]
Common Mistakes:
Confusing process control with software installation
Thinking it manages hardware settings
Mixing it up with user account management
2. Which command is used to pause a running process in Linux?
easy
A. kill -9 <pid>
B. kill -STOP <pid>
C. kill -CONT <pid>
D. kill -TERM <pid>
Solution
Step 1: Recall kill command signals
The kill command sends signals to processes; -STOP pauses, -CONT resumes.
Step 2: Identify pause signal
Signal -STOP pauses the process without terminating it.
Final Answer:
kill -STOP <pid> -> Option B
Quick Check:
Pause process = kill -STOP [OK]
Hint: Use kill -STOP to pause a process [OK]
Common Mistakes:
Using kill -9 which forcefully kills the process
Confusing -CONT (resume) with pause
Using kill -TERM which terminates the process
3. What will be the output of the command sequence below?
sleep 100 &
jobs
kill -STOP %1
jobs
medium
A. Shows the job stopped both times
B. Shows no jobs running
C. Shows the job running, then shows it stopped
D. Shows an error because kill -STOP is invalid
Solution
Step 1: Understand the commands
sleep 100 & runs sleep in background; jobs lists jobs; kill -STOP %1 pauses job 1.
Step 2: Predict jobs output
First jobs shows sleep running; after kill -STOP, jobs shows it stopped.
Final Answer:
Shows the job running, then shows it stopped -> Option C
Quick Check:
jobs before and after kill -STOP = running then stopped [OK]
Hint: jobs shows status; kill -STOP pauses job [OK]
Common Mistakes:
Thinking kill -STOP kills the job
Expecting no jobs after sleep &
Believing kill -STOP is invalid
4. You run kill -STOP 1234 but the process does not pause. What is the most likely reason?
medium
A. You need to run the command as root
B. You used the wrong signal; should be kill -9
C. The process is already stopped
D. The process ID 1234 does not exist
Solution
Step 1: Check process existence
If the process ID does not exist, kill commands have no effect.
Step 2: Consider other reasons
Wrong signal or permissions cause errors, but no pause means no such process.
Final Answer:
The process ID 1234 does not exist -> Option D
Quick Check:
Nonexistent PID = no pause [OK]
Hint: Check if PID exists before sending signals [OK]
Common Mistakes:
Assuming kill -9 pauses process
Ignoring process existence
Thinking root is always required
5. You want to temporarily pause a script running in the background, then resume it later. Which sequence of commands correctly achieves this?
hard
A. kill -STOP <pid> to pause, then kill -CONT <pid> to resume
B. kill -TERM <pid> to pause, then kill -STOP <pid> to resume
C. kill -9 <pid> to pause, then restart the script manually
D. kill -CONT <pid> to pause, then kill -STOP <pid> to resume
Solution
Step 1: Identify pause and resume signals
kill -STOP pauses a process; kill -CONT resumes it.
Step 2: Verify command sequence
Pause with kill -STOP, then resume with kill -CONT is correct.
Final Answer:
kill -STOP <pid> to pause, then kill -CONT <pid> to resume -> Option A
Quick Check:
Pause = kill -STOP, Resume = kill -CONT [OK]
Hint: Pause with STOP, resume with CONT signals [OK]
Common Mistakes:
Using kill -9 which kills process
Mixing up STOP and CONT signals
Trying to resume with STOP signal
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.