Bird
0
0

Which of the following is the correct syntax to run my_script.sh persistently in the background using nohup?

easy📝 Syntax Q12 of 15
Linux CLI - Process Management
Which of the following is the correct syntax to run my_script.sh persistently in the background using nohup?
Anohup my_script.sh &
Bnohup & my_script.sh
Cmy_script.sh nohup &
Dnohup my_script.sh
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct nohup syntax

    The correct way is to write nohup command & to run the command persistently in the background.
  2. Step 2: Check each option

    nohup my_script.sh & matches the correct syntax. nohup & my_script.sh places & before the command incorrectly. my_script.sh nohup & misplaces nohup. nohup my_script.sh runs nohup but not in background.
  3. Final Answer:

    nohup my_script.sh & -> Option A
  4. Quick Check:

    nohup + command + & = correct syntax [OK]
Quick Trick: Use nohup command & to run in background [OK]
Common Mistakes:
  • Placing & before the command
  • Omitting & to run in background
  • Misplacing nohup after the command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes