LFCS Essential Commands Practice Question
An administrator wants to ensure that a background process continues running after logout. Which command should be used to start the process?
⚠ Common exam trap
Watch out — candidates often think `&` alone or `disown` alone is sufficient to keep a process running after logout, but without `nohup`, the process will still receive SIGHUP and terminate when the shell exits.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
nohup sleep 100 &
`nohup` allows a process to ignore the SIGHUP signal that is sent to background processes when the parent shell exits, ensuring it continues running after logout. The `&` places the command in the background, and `nohup` redirects output to `nohup.out` by default, making it the standard way to run a process immune to hangups.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
nohup sleep 100 &
Why this is correct
nohup ignores SIGHUP, so process continues after logout.
- ✗
runproc sleep 100 &
Why it's wrong here
Not a valid command.
- ✗
sleep 100 &
Why it's wrong here
Runs in background but will be terminated on logout.
- ✗
sleep 100 & disown
Why it's wrong here
Does remove job from shell's job control, but SIGHUP may still be sent if not handled; nohup is preferred.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.