Bird
0
0

What is the primary effect of using nohup when executing a command in a Linux shell?

easy📝 Conceptual Q1 of 15
Linux CLI - Process Management
What is the primary effect of using nohup when executing a command in a Linux shell?
AIt runs the command with elevated privileges
BIt allows the command to continue running after the user logs out
CIt schedules the command to run at a later time
DIt redirects all output to the system log
Step-by-Step Solution
Solution:
  1. Step 1: Understand nohup's purpose

    nohup stands for 'no hangup' and is used to ignore the SIGHUP signal.
  2. Step 2: Effect on process

    When a user logs out, the shell sends SIGHUP to child processes. nohup prevents this, allowing the process to continue.
  3. Final Answer:

    It allows the command to continue running after the user logs out -> Option B
  4. Quick Check:

    Does it keep process alive post logout? [OK]
Quick Trick: nohup ignores hangup signals to keep processes alive [OK]
Common Mistakes:
  • Assuming nohup elevates privileges
  • Confusing nohup with scheduling tools like cron
  • Believing nohup redirects output automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes