Long-running commands stop if your SSH session closes unless they are managed by a service or terminal multiplexer. screen and tmux let you detach from a command and reconnect later.

Using screen

sudo apt install screen
screen -S gameserver

Start your command inside the screen session. Detach with CTRL + A, then D.

Reconnect later with:

screen -r gameserver

Using tmux

sudo apt install tmux
tmux new -s gameserver

Detach with CTRL + B, then D. Reconnect with:

tmux attach -t gameserver

For production services, a proper systemd service is usually better than leaving game servers in a manual screen session.

  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

How to connect to a Linux VPS with SSH

SSH is the normal way to manage a Linux VPS. It gives you a terminal on the server so you can...

How to update packages on a Linux VPS

Keeping packages updated helps patch security issues and keeps server tools compatible. Run...

How to create a sudo user on a Linux VPS

A sudo user lets you manage a Linux VPS without logging in as root for every task. This is safer...

How to secure SSH on a Linux VPS

SSH is the main way to manage a Linux VPS, so it should be secured before the server is used for...

How to check disk usage on a Linux VPS

Disk usage issues can stop updates, backups, logs, databases, and game saves from writing...