Linux terminal cheatsheet for VPS owners
The 40 commands you actually use: files, processes, networking, firewall, services, logs and disk usage.
7 min readVPS
Your D-SERV VPS is unmanaged, so the terminal is your control room. These are the commands you’ll reach for every week, grouped by task.
Files & directories
bash
ls -lah # list files with sizescd /var/www # change directorycp -r src/ backup/ # copy recursivelymv old.txt new.txt # move / renamerm -rf ./tmp # delete (careful!)nano /etc/hosts # edit a filetar -czf site.tgz www/ # compress a folderSystem & processes
bash
htop # live CPU / RAM viewdf -h # disk usage by mountdu -sh * | sort -h # biggest folders herefree -h # memory usageps aux | grep java # find a processkill -9 <PID> # force-stop a processServices & logs
bash
systemctl status nginxsystemctl restart nginxsystemctl enable --now dockerjournalctl -u nginx -f # follow service logstail -f /var/log/syslogNetworking & firewall
bash
ip a # IP addressesss -tulpn # listening portsufw allow 22/tcp # allow SSHufw allow 30120 # allow a game portufw enable && ufw statuscurl -I https://d-serv.uk # test HTTPUpdates & packages
bash
apt update && apt upgrade -y # Ubuntu / D-SERV OSdnf upgrade -y # AlmaLinuxapt install -y screen git unzipSSH hardening
sshd_config
adduser deploy && usermod -aG sudo deployssh-copy-id deploy@your-vps-ip# then in /etc/ssh/sshd_config:PermitRootLogin noPasswordAuthentication noWarning:
Test your SSH key login in a second terminal before disabling password authentication, or you can lock yourself out.
Still stuck?
Our engineers configure servers every day — we're here to help.