Ubuntu / Minecraft Server Cheat-Sheet I've been hosting and setting up game servers since I was around 13 years old. Recently, I decided it was time to properly take a deep dive into Linux, specifically Ubuntu servers, since this is something I'm genuinely interested in and want to work with professionally. I set up Ubuntu Server 24.04 in a virtual machine and started building everything from scratch. Along the way, I found myself constantly forgetting certain commands, especially the ones I use most often for Minecraft server hosting and general troubleshooting. So I created this personal cheat sheet. It's mainly focused on Ubuntu servers running Minecraft, but I also use it as a general Linux refresher. Hopefully, it can help others as well. Term explanation
vim - terminal text editor
curl - tool to download files from the internet
screen - keeps a program running in a detachable terminal session
tail - displays file output in real time
ssh - log into a remote machine securely Navigation & files
ls -la - list all files including hidden (with permissions)
cd / - go to root directory
cd .. - go up one folder
cd ~/mcserver - go to Minecraft server folder
pwd - show current directory
cat file.txt - display file contents
rm -f paper.jar - delete file forcefully
nano filename - edit file (Ctrl+O save, Ctrl+X exit)
ip a - show IP addresses (Windows ipconfig equivalent) Screen commands
screen -S name - create and enter a new screen session
screen -ls - list active screen sessions
screen -r name - reattach to a session
screen -r 1234.mc - reattach using PID
Ctrl + A then D - detach without stopping the server
screen -X -S 1234.mc quit - kill a specific session
screen -wipe - clean up dead sessions SSH commands
ssh user@ip - connect via SSH
ssh -p 2222 user@ip - connect using custom port
ssh-copy-id user@ip - enable passwordless SSH login
exit - disconnect from SSH
scp paper.jar user@ip:~/mcserver/ - upload file to server
scp user@ip:~/mcserver/logs/latest.log - download file
sudo systemctl status ssh - check SSH status
sudo systemctl start ssh - start SSH service
sudo ufw allow ssh - allow SSH through firewall RAM / CPU
free -h - show RAM usage
htop - live CPU & memory usage Downloading files
curl -L -o filename URL - command
-L - follow redirects
-o - output file name Vim basics
vim file.txt - open file
i - insert mode
Esc :wq - save & quit
Esc :q! - quit without saving Tail log stuff tail -f logs/latest.log - live console (Ctrl+C = stop)
tail -f /var/log/syslog - show system messages
tail -f /var/log/auth.log - show who logged in
tail -f plugins/*/debug.log - show plugin debug
tail -f logs/latest.log | grep ERROR - show only errors MC start one liner
screen -S mc && java -Xmx6G -Xms6G -jar paper.jar --nogui What are Aikar's flags?
A set of JVM arguments that optimize Java’s garbage collector for Minecraft servers.
Without them: lag spikes & crashes.
With them: much smoother performance and stable TPS. Starting the MC server with Aikar's flags
java -Xmx6G -Xms6G \
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC \
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 \
-XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 \
-jar paper.jar --nogui I'm currently documenting my Linux and game server hosting learning publicly while working toward junior hosting & support roles. If this cheat sheet helped you, feel free to comment or reach out! Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse