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
| Command | What it does |
|---|---|
pwd | Print the folder you’re in |
ls -lah | List files with sizes and hidden files |
cd /var/www/example.com | Change directory |
cp file.txt backup.txt | Copy a file |
mv old.txt new.txt | Move/rename |
rm file.txt | Delete a file (careful — no undo) |
mkdir assets | Make a folder |
Looking inside files & logs
| Command | What it does |
|---|---|
cat config.php | Print a file |
tail -f app.log | Follow a log live (Ctrl-C to stop) |
grep -ri "error" . | Search text in files, recursively |
find . -name "*.env" | Find files by name |
Resources & processes
| Command | What it does |
|---|---|
df -h | Disk space per mount |
du -sh * | Size of each item in this folder |
free -m | Memory used/free (MB) |
top (or htop) | Live CPU/memory by process |
ps aux | grep node | Find a running process |
Transfer & archives
| Command | What it does |
|---|---|
curl -I https://example.com | Check a URL’s headers/status |
unzip site.zip | Extract 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.