linux系统 / shell相关

create a new detached screen session running command

some times we need running a script to initialise a new server and after that we want to run our program or script before ground but do not want this hang on.

yes as we know, we can use screen command to let a program or script running before ground, and do not be quit when terminal close, but how to make a detached screen session in cli line.

we can use the follow command to create a new detached screen session

The command creates new session “test”, executes ‘date’ and then start your default shell (to keep the detached session alive). Change ‘date’ to fit your needs.

will attach the created session.

© 2016, 深夜的蚊子. 版权所有. 如转载,请注明:转载自 蚊子空间站[http://www.wenzizone.com]

Leave a Reply

Your email address will not be published. Required fields are marked *