Run command then close the terminal(Linux)

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

猜你喜欢

转载自roddy.iteye.com/blog/2315234