screen command on nix systems

screen is a tool for running a job on a nix server and keep it running even after you have logged out from the server.

1. Create a screen and give it a name myjob

screen -S myjob

2. After you have typed the above command, it will bring you to the screen window you just created with the name myjob. Now you can start a long running program on the screen. Let’s you are running a script on your current directory.


3. After you have started your long running program, you can exit the screen by detach command by press

Ctrl-a d

4. Now you are back to your normal command line window. You can see a list of screens that are running by this command.

screen -ls

5. The above command will give you something like this

	13148.myjob	(Detached)
	16763.myjob2	(Detached)
	11796.myjob3	(Detached)

6. To go back to the screen myjob, type the command

screen -r 13148.myjob

7. To kill/quit the screen myjob

screen -X -S 13148.myjob quit

Search within Codexpedia

Custom Search

Search the entire web

Custom Search