Process Management Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Process Management flashcards as text
Which command displays the process tree showing parent-child relationships?
Answer: pstree
pstree displays running processes as a tree, visually showing parent-child relationships between processes.
What does 'kill -0 PID' do?
Answer: Sends no signal but checks if the process exists and you can signal it
Signal 0 is never actually sent; it only checks whether the process exists and whether the caller has permission to signal it.
What is the difference between foreground and background jobs in a shell?
Answer: Foreground jobs receive terminal input; background jobs do not
Foreground jobs have control of the terminal and receive keyboard input, while background jobs run without terminal control.
Which command brings a background job to the foreground?
Answer: fg %1
fg %jobnumber brings the specified background job into the foreground and gives it terminal control.
What does the /proc/PID/fd directory contain?
Answer: Symbolic links to all file descriptors opened by the process
/proc/PID/fd contains one symbolic link per open file descriptor, pointing to the actual file, socket, or pipe.
Which signal is used to reload a daemon's configuration file without restarting it?
Answer: SIGHUP (1)
SIGHUP (1) was originally a 'hangup' signal but many daemons handle it as a cue to reload their configuration files.
What is the init process's PID and why is it special?
Answer: PID 1; it is the first userspace process and parent of all others
PID 1 is the init/systemd process โ the first userspace process started by the kernel and the ultimate ancestor of all other processes.