Linux commands help you check a game server in a controlled way, manage files, monitor processes, and find errors in logs. At game-serverhosting, technical control, support, and traceable processes are the focus: you can manage many routine tasks comfortably, but you should know the most important terminal commands if you want to analyze more deeply or intervene manually.

Requirements

For the following commands, you need a Linux server or enabled SSH/terminal access, suitable user permissions, and the path to your game server directory. Avoid working blindly as root if possible. If you change configuration files, create a copy first and document what you adjusted.

If you prefer managing files through a graphical client, the guide on SFTP access for game server files is a suitable addition. In-game admin commands are a different topic: for Valheim, you can find them in the guide on Valheim Server Commands and Admin Commands, and for Rust in the guide on Rust Server Commands and Admin Commands.

File system

These commands help you navigate the directory tree and change files or folders. Before risky actions, always check the current path with pwd and the contents with ls -la.

ls -la                    # Show files
cd /home/server           # Change folder
pwd                       # Show current path
cp file.txt backup.txt   # Copy file
mv old.txt new.txt        # Rename/move file
rm file.txt              # Delete file
mkdir folder              # Create folder
chmod +x start.sh         # Make executable

cp is suitable for quick backups of individual configuration files. mv can rename or move files. rm deletes without a recycle bin; therefore, use it only when the file name and path are correct. With chmod +x start.sh, you make a start script executable if the server does not start because execution permissions are missing.

Processes

Process commands show you whether a game server is running, how heavily CPU and RAM are loaded, and which process ID you need for a targeted restart.

ps aux | grep server      # Search processes
top                       # CPU/RAM overview
htop                      # Better overview
kill <PID>                # Stop process
kill -9 <PID>             # Force process termination
screen -S server          # Start screen session
screen -r server          # Resume session

kill <PID> stops a process normally. kill -9 <PID> forces termination and should remain the exception, because the server may no longer be able to perform clean save or shutdown steps. screen is useful if a server process should keep running after you close the SSH session.

Network

Network commands help you check port forwards, reachability, and firewall rules. This is especially important if a server runs locally but does not appear in the game browser.

netstat -tulpn            # Show open ports
ss -tulpn                 # More modern alternative
ping 8.8.8.8              # Test connection
traceroute server.example.com      # Trace route
iptables -L               # Firewall rules
ufw status                # UFW status
ufw allow 25565/tcp       # Open port

ss -tulpn is the preferred choice on many current Linux systems to see listening TCP and UDP ports. ping checks basic reachability, but does not say whether the game port is open. ufw allow 25565/tcp is an example of a port allowance; replace the port and protocol with the values for your game.

Edit files and read logs

Logs are often the fastest way to the cause: missing mod files, wrong startup parameters, port conflicts, or corrupted configurations usually appear there before visible symptoms.

nano file.txt            # Open editor
vim file.txt             # Vim editor
cat file.txt             # Show file
tail -f server.log        # Follow log live
grep "error" server.log   # Search in file

nano is easier to access for quick changes, while vim is more powerful but requires routine. With tail -f server.log, you watch startup live. grep "error" server.log filters for error messages; if needed, also search for terms like failed, exception, denied, port, or the name of a mod.

Server management

If your game server is set up as a systemd service, you control it through systemctl and read system logs with journalctl. The official systemd documentation describes systemctl as a tool for controlling the systemd system and service manager: documentation at freedesktop.org

systemctl status server   # Service status
systemctl restart server  # Restart service
journalctl -u server      # Show logs
df -h                     # Check storage space
free -h                   # RAM usage

systemctl status server shows whether a service is active and which recent log lines may be relevant. journalctl -u server is more precise if you need more history. df -h checks free storage space; full disks can block updates, saves, and log files. free -h shows whether memory is getting tight.

SteamCMD

Many dedicated game servers are installed or updated through SteamCMD. The existing command uses anonymous login, updates an app ID, validates files, and then exits SteamCMD.

steamcmd +login anonymous +app_update <appid> validate +quit
Game App ID
CS2 730
Rust 258550
ARK 376030
Valheim 896660
7D2D 294420

Replace <appid> with the matching app ID. After an update, you should start the server, check the startup log, and test whether the server is reachable. On modded servers, validate can overwrite local changes; therefore, back up important configurations and mod files beforehand.

Check the result

After changes, check in three steps: is the process running, is the port listening, and do the logs show no new errors? This order is practical: systemctl status server or ps aux | grep server, then ss -tulpn, then tail -f server.log or journalctl -u server. Only when this layer is correct is testing in the game client worthwhile.

Troubleshooting

Server does not start

First check the startup log. Common causes are missing execution permissions on start.sh, a wrong working folder, missing files, or an occupied port. Check pwd, ls -la, chmod +x start.sh, and then the log output.

Port is not reachable

Compare game port, query port, and protocol. Some game servers use TCP and UDP differently. Use ss -tulpn to check whether the service is listening and ufw status to check whether the firewall allows the connection.

Process hangs or does not respond

Find the process ID with ps aux | grep server. First try a normal stop through the service or game server console. Use kill -9 <PID> only if the process can no longer be stopped cleanly.

Update changed the configuration

If settings are missing after SteamCMD validation, restore your backup or compare the affected files. Especially with mods and customized startup parameters, you should back up changes before updates.

Verification, limits, and safe rollback

The guide “Linux Game Server Commands – Important Terminal Commands” applies to the server type described in the article and the version state visible at the time of verification. Menu names, available versions, mod or plugin compatibility, and required resources may differ after updates. Therefore, do not transfer values to another game, loader, or server version without checking them.

Before making changes to the world, savegame, configuration, or extensions, create a backup of the affected files. Then change only one related step and test it with the same client and server version you want to play with later.

Checkpoint Expected result Abort and rollback
Server startup The server reaches the ready-to-operate state without new error messages. If startup errors occur, revert the change and restore the last backup.
Connection test A test account can connect using the address shown in the panel. If version or connection errors occur, compare version, port, and shares again.
Function test The specifically changed function works without damaging existing world or game data. If side effects occur, stop the server and restore the backed-up files.

A successful individual test is not a guarantee of performance or availability. World size, mods, plugins, player count, network path, and simultaneous load can change the result. Document version, change, and test result so you can understand later deviations.

FAQ

Do I always need these Linux commands at game-serverhosting?

No. Many standard tasks run through management interfaces and supported operating processes. The commands are mainly helpful if you want to understand technical causes yourself or work specifically with support instructions.

Is netstat or ss better?

ss is usually the more suitable choice on modern Linux systems because it uses the newer tool family. If netstat is available on your system, it can still work for simple checks.

When should I use kill -9?

Only as a last resort when a process does not respond to normal stops. A forced abort can interrupt write operations, so you should check logs and save files afterward.

Can I use SteamCMD anonymously for every game?

No. The command shown only works for server apps that allow anonymous access. If a game requires login or additional rights, you must follow the official documentation for that specific game.

What is the most important command for troubleshooting?

There is no single command. In practice, the combination of tail -f server.log, ss -tulpn, and systemctl status server is especially useful because it makes log errors, ports, and service status visible together.