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.
Quick answer
The Linux commands a game server admin uses most are cd and ls to move around, nano to edit configs, cp, mv and tar for files and backups, screen or tmux to keep a server running after you log out, top/htop, free -h and df -h for resources, and systemctl and journalctl for services and logs.
If you only memorise a handful, make it these — they cover ninety percent of day-to-day game-server admin on a VPS:
| Command | What it does |
|---|---|
| ls -lah | List files with sizes, including hidden ones |
| tail -f logs/latest.log | Watch a log update live |
| screen -S name | Keep a server running after you disconnect |
| htop | Live view of CPU, RAM and processes |
| systemctl restart myserver | Restart a service |
| df -h | Check free disk space |
| ss -tlnp | See what's listening on which port |
| chown -R user:user dir/ | Fix file ownership |
The rest of this cheat sheet groups every command by the job you're doing.
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 liveKeeping 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 sessionsInside 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 dieServices (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 logsPermissions & ownership
chmod +x start.sh # make a script runnable
chown -R gameuser:gameuser server/ # fix ownershipDisk, 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.
Networking & diagnostics commands
curl ifconfig.me— show your server's public IP, useful when sharing anip:portwith players.ss -tlnp— see exactly which process is listening on which port, the fastest way to debug "port already in use".traceroute host— trace the network path to a host, useful when diagnosing lag or packet loss.dig +short domain— check DNS resolution quickly without the noise of a full dig output.ping -c 4 host— a quick four-packet check that a host is reachable at all.
Log files worth knowing
/var/log/syslogor/var/log/messages— the general system log, first stop for anything not covered by a service's own log.journalctl -xe— recent systemd errors with extra context, the fastest way to see why a service failed to start.dmesg -T— kernel messages with human-readable timestamps, useful after an OOM kill, a crash, or a hardware/driver issue.
Good habits that prevent most Linux headaches
- Always try
screen -rortmux attachbefore assuming a server died — it may just be detached, not gone. - Check
df -hbefore every big update or backup so a full disk doesn't stop it halfway through. - Keep a personal text file of your frequently-used commands and server-specific paths — you will forget them.
- Double-check the target of any destructive command (
rm,kill -9) before hitting enter, especially over a slow SSH session.
Related guides
For a deeper dive on resource monitoring, see how to check CPU, RAM and disk usage. To lock a VPS down properly, read how to secure a Linux VPS and how to set up a firewall with ufw. If a scheduled task silently isn't running, check cron job not running.