Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
159
rated 0 times [  159] [ 0]  / answers: 1 / hits: 384717  / 3 Years ago, thu, may 20, 2021, 5:00:02

How can I run a shell script in background?


More From » scripts

 Answers
5

Depending on what you are wanting, just add a & to the end of the command



script.sh &
command &


If you are running it in a terminal, and you want to then close the terminal, use nohup or disown



nohup



nohup script.sh &


disown



script &
disown


If that is not what you are after, please be more specific in your question.


[#41436] Friday, May 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pardsea

Total Points: 290
Total Questions: 115
Total Answers: 98

Location: Svalbard and Jan Mayen
Member since Sun, Sep 25, 2022
2 Years ago
;