There’s more to it than I’ve got here. I’m only putting stuff in here than I’m using or find interesting.For going to the cheatsheet click here.
Linux Screen is great. It allows you:
Note that I’m using Minimal CentOS 8 for this.
My specific use case is, that I can start multiple Discord bots on my CentOS VM. Without it, I’d be able to start a single one.
To install screen on CentOS, you need to install the epel packages by typing:
dnf -y install epel-release
The -y parameter just says yes to the installation, so you don’t have to press Y and then ENTER afterwards.Screen is now installed.
To start a screen, you simply type
And you’re in a new screen.
To detach it, there seems to be no command for it, but the the builtin way is by pressing:
CTRL + A + D
That is on a Windows keyboard, if you’re using a MAC you’d need to use the equivalent.
If you want to name your session, you type
screen -S session_name
and name your session whatever you’re doing with it, or want to name it.
To view your screens, type:
and it will list your current screens.
If you’d like to kill a session, you need the ID of the session. You can get it by typing the command above.When you have the ID of the session, type:
screen -X -S # quit
# is the ID number.If you want to kill all screens, type:
For reattaching to a screen, type:
screen -r #
Remember to put in the session ID number from using:
Powered by BetterDocs
Save my name, email, and website in this browser for the next time I comment.