Quiz: Process Management and Job Control
Test your understanding of processes, signals, and job control.
1. What is a process in Linux?
- A file stored on disk
- A running instance of a program
- A type of user account
- A network connection
Show Answer
The correct answer is B. A process is a running instance of a program. When you execute a command, the kernel creates a process with its own memory space, process ID (PID), and resources. Multiple processes can run the same program simultaneously.
Concept Tested: Process
2. What is a PID?
- Personal Identification Data
- Process ID - a unique number identifying each process
- Peripheral Interface Device
- Program Installation Directory
Show Answer
The correct answer is B. PID (Process ID) is a unique number the kernel assigns to each running process. PIDs are used to identify and manage processes. PID 1 is always the init/systemd process.
Concept Tested: Process ID
3. What does the ps aux command show?
- Only your processes
- All processes on the system with detailed information
- Auxiliary storage devices
- Power supply status
Show Answer
The correct answer is B. ps aux shows all processes running on the system (a = all users, u = user-oriented format, x = include processes without terminals). It displays PID, user, CPU%, memory%, and command.
Concept Tested: Ps Command
4. What does top do?
- Shows the top line of a file
- Displays real-time process information and system stats
- Lists files at the top of a directory
- Shows network topology
Show Answer
The correct answer is B. top provides a real-time, continuously updating view of system processes, CPU usage, memory usage, and other system statistics. Press q to quit, k to kill a process.
Concept Tested: Top Command
5. What does kill 1234 do?
- Deletes file with ID 1234
- Sends the TERM signal to process 1234
- Shuts down the computer
- Removes user 1234
Show Answer
The correct answer is B. kill sends a signal to a process. By default, it sends SIGTERM (signal 15), asking the process to terminate gracefully. The number is the PID of the target process.
Concept Tested: Kill Command
6. What's the difference between kill and kill -9?
- They're identical
killrequests termination;kill -9forces immediate terminationkill -9is fasterkill -9kills 9 processes at once
Show Answer
The correct answer is B. kill sends SIGTERM (15), allowing the process to clean up before exiting. kill -9 sends SIGKILL (9), which immediately terminates the process—it cannot be ignored or caught. Use -9 only when necessary.
Concept Tested: Kill Command, Signals
7. What does & at the end of a command do?
- Redirects output to a file
- Runs the command in the background
- Runs the command as root
- Appends output to a file
Show Answer
The correct answer is B. Adding & at the end of a command runs it in the background, immediately returning control to the shell. For example, ./long_script.sh & starts the script without blocking your terminal.
Concept Tested: Background Processes
8. What does Ctrl+Z do to a running process?
- Terminates it permanently
- Suspends it (puts it in the background, stopped)
- Zooms in on the output
- Saves the current state
Show Answer
The correct answer is B. Ctrl+Z suspends (pauses) the current foreground process and puts it in the background in a stopped state. Use fg to resume it in the foreground or bg to resume it in the background.
Concept Tested: Job Control
9. What command lists background jobs in the current shell?
- ps
- jobs
- bg
- list
Show Answer
The correct answer is B. The jobs command lists all jobs (processes) started from the current shell session, including their status (Running, Stopped). Use fg %1 to bring job 1 to the foreground.
Concept Tested: Jobs Command
10. What is a daemon?
- A malicious virus
- A background service process that runs continuously
- A debugging tool
- A type of file format
Show Answer
The correct answer is B. A daemon is a background process that runs continuously, typically started at boot time, providing services like web serving (httpd), printing (cupsd), or logging (syslogd). Daemon names often end in 'd'.
Concept Tested: Daemon Processes
See: Chapter 12 - Daemons