Basic Linux Command Line Troubleshooting for Game Servers
Learn essential Linux commands to read logs, check disk space, and troubleshoot your game server via SSH or web console.
While the GameSphere web panel handles 99% of your needs, power users who rent our Bare Metal or VPS options often interact directly with Linux via SSH. Understanding a few basic commands can save you hours of troubleshooting.
1. Checking Disk Space
Game servers write massive log files and save data. If your disk fills up, the server will crash instantly. To check your disk usage, run:
df -h
Look at the Use% column for your main partition (usually /dev/sda1 or /dev/nvme0n1p1). If it is at 100%, you need to delete old backups or logs.
2. Reading Live Log Files
To watch a log file update in real-time (perfect for watching server startup sequences), use the tail command with the -f (follow) flag:
tail -f /path/to/your/server/logs/latest.log
Press CTRL+C to exit the live view.
3. Finding Resource Hogs
Is your server lagging, but you aren't sure why? Use htop to view real-time CPU and RAM usage per process.
htop
Press F6 to sort by CPU% or MEM% to instantly identify if a rogue plugin or process is consuming all your resources.
4. Finding Large Files
If your disk is full and you don't know what is taking up space, use this command to find the top 10 largest files/folders in the current directory:
du -ah . | sort -rh | head -10
