Linux-screen tool: Run background process without nohup

Published by

Posted on September 09, 2015

I was getting tired of reconnecting to my remote server and signing into IRC. I found this old tool called screen. Screen allows me to log into IRC and stay connected as long as the server itself has a net connection. Below are some helpful examples for using screen.

Debian install screen
apt-get install screen

Fedora
dnf install screen

Running screen
Control-a ? will give help inside of screen.

screen or screen -S sessionname
#Create a new shell
CRTL+a and c
#switch between shells
CRTL+a and number (1-10)
#Detach and resume
screen -d -R sessionname/id will resume a session that you started in a different location
#kill a screen session
CRTL+a k — The system will ask you if you are sure you want to kill the session

###note , you can have x number of sessions and x number of windows. Think of a shell as one terminal window open. While each shell can can have multiple windows. Think of them as tabs ###
#open a new window within a shell
CRTL+a n
#create a new session
screen -S sessionname

Show a list of running sockets
screen -ls

Detach from a screen
screen -d

You can use screen to connect to your Router via console
screen /dev/ttyS0 9600

–As i use this tool more. I will post updates to this article —