Essential Linux Commands for Game Server Admins
You don't need to be a sysadmin to run a game server on a VPS — just a handful of commands. Here's the practical cheat sheet, grouped by what you'll actually do.
Moving around & files
pwd # where am I?
ls -lah # list files, sizes, hidden ones
cd /home/gameuser # change directory
nano server.cfg # edit a file (Ctrl+O save, Ctrl+X exit)
tail -f logs/latest.log # watch a log live
Keeping a server running: screen / tmux
If you start a server over SSH and close the terminal, it stops. screen (or tmux) keeps it alive in a detachable session:
screen -S mc # new session named 'mc'
# start your server here, then press Ctrl+A then D to detach
screen -r mc # re-attach later
screen -ls # list sessions
Inside screen, Ctrl+A then D detaches and leaves the server running. Typing exit or closing the window kills it. This trips up almost every new admin.
Managing processes
htop # live process viewer
ps aux | grep srcds # find a running game server
kill 12345 # stop a process by PID
kill -9 12345 # force-stop if it won't die
Services (systemd)
systemctl status myserver # is it running?
systemctl restart myserver # restart it
systemctl enable myserver # auto-start on boot
journalctl -u myserver -f # follow its logs
Permissions & ownership
chmod +x start.sh # make a script runnable
chown -R gameuser:gameuser server/ # fix ownership
Disk, network & updates
df -h # disk space
ss -tlnp # what's listening on which port
ufw allow 27015/udp # open a game port (ufw)
apt update && apt upgrade # update (Debian/Ubuntu)
Master screen, systemctl and tail -f and you can run almost any game server from the command line with confidence.
Prefer a panel over a terminal?
Our managed game hosting gives you a clean web panel — console, files and restarts — no Linux needed.
Frequently asked questions
How do I keep my server running after I close SSH?
Run it inside a screen or tmux session. Start the session, launch the server, then detach (Ctrl+A then D in screen). The server keeps running and you can re-attach anytime.
What's the difference between kill and kill -9?
kill sends a polite request to shut down, letting the process save and clean up. kill -9 force-terminates it immediately — use it only when a process is frozen and won't stop normally.
Do I need to learn Linux to host a game server?
Not necessarily. Managed game hosting with a control panel needs no command line. But a few Linux basics help a lot if you run your own VPS.
Related articles
Fix SSH "Connection refused" / "Connection timed out"
SSH "connection refused" vs "timed out" — what each means and the exact steps to fix them.
Read fix Linux & VPSFix "Permission denied" on Linux (chmod & chown Explained)
"Permission denied" on a script or file? Understand chmod/chown and fix it the right way.
Read fix Linux & VPSHow to Check CPU, RAM & Disk Usage on a Linux Server
The essential commands to check CPU, RAM and disk on Linux — and find what's eating them.
Read fix