Skip to content

20 Linux commands every self-hoster should know

You don’t need to be a sysadmin to run a server, but a handful of commands will save you every single day. Run these in the web terminal or over SSH.

Moving around & files

CommandWhat it does
pwdPrint the folder you’re in
ls -lahList files with sizes and hidden files
cd /var/www/example.comChange directory
cp file.txt backup.txtCopy a file
mv old.txt new.txtMove/rename
rm file.txtDelete a file (careful — no undo)
mkdir assetsMake a folder

Looking inside files & logs

CommandWhat it does
cat config.phpPrint a file
tail -f app.logFollow a log live (Ctrl-C to stop)
grep -ri "error" .Search text in files, recursively
find . -name "*.env"Find files by name

Resources & processes

CommandWhat it does
df -hDisk space per mount
du -sh *Size of each item in this folder
free -mMemory used/free (MB)
top (or htop)Live CPU/memory by process
ps aux | grep nodeFind a running process

Transfer & archives

CommandWhat it does
curl -I https://example.comCheck a URL’s headers/status
unzip site.zipExtract a zip
tar -czf backup.tgz folder/Compress a folder

Tip: the biggest footgun is rm -rf. Double-check the path before you run anything destructive, and keep backups.

Next: Find what’s eating disk and memory →


New to the command line? OrbixPanel does most of this for you in the UI. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.