Using screen on ubuntu ( LINUX GUIDE )

Tutoriale, ghiduri de optimizare si suport pentru crearea serverelor.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 4444
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

Using screen on ubuntu ( LINUX GUIDE )

Post by greenie »

Screen allows us to separate our long running sessions such as FiveM and Teamspeak on a “screen”.
Your “screen” will stay running even after you have logged out.

Step 1. Installing Screen

sudo apt-get update
sudo apt-get install screen
Simple enough.
Step 2. Using Screen

screen -ls ( Shows available sessions, ids, and names )
screen -r sessionname ( Opens the session that you selected with sessionname )
screen -dr sessionname ( Opens the session directly even if it is currently open by one or more clients )
screen -dmS sessionname command ( creates new session )
Example of starting FiveM with screen :

screen -dmS fivemserver bash /root/fx-server/run.sh +exec server.cfg

Example output of screen -ls
image
To open the “fivemserver” session you do :

screen -r fivemserver
if “fivemserver” is “(Attached)”, this means there is currently someone already inside the session ( this happens if you improperly exit the session aswell ) screen -r will NOT work if the session is attached, so you must directly open it with

screen -dr fivemserver
You should also notice the ID assigned to the session, look to the left of fivemserver, see the 17190?, you can open a session with just that.

screen -r 17190
This should be used when there are multiple sessions running under the name of “fivemserver”, or else screen will not work.

notice how when you have multiple sessions using the name of “fivemserver” wont work, that is why we use the ID when there are multiple sessions using the same name.
MUST READ
To terminate a session, do [CNTRL]+[C] while it is open. To exit the session do [CNTRL]+[A]+[D]

You are welcome for this bad guide.
𝑴𝒂𝒚𝒃𝒆 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 𝒊𝒔 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☢️

✅ GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to “Server Development”