Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I run a shell script in background?

share|improve this question

1 Answer 1

up vote 28 down vote accepted

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.

share|improve this answer
    
Thank You Very Much –  erkan şentürk Dec 15 '11 at 21:12
    
You are most welcome –  bodhi.zazen Dec 15 '11 at 21:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.