Server work happens in the terminal. Panels help, but when a site goes down or a disk fills up, the fix starts with a command. These are the linux commands every server admin reaches for first: twelve commands that cover load, memory, disk, logs, processes, and network, with the exact flags that make each one useful.
This is not a list to memorize in one sitting. Pick the three you need this week, use them on a real server, and add the rest as problems come up. These essential linux server commands work on Ubuntu, Debian, and most other distributions, and they need no extra software. If you are still setting up your first machine, start with how to set up a secure Ubuntu 24.04 VPS from scratch so you have a safe server to practise on.
Check load and memory first: linux commands every server admin uses daily
1. uptime and top: see load at a glance
When a server feels slow, check load first. The uptime command prints how long the server has run and the load average for the last 1, 5, and 15 minutes.
uptime
top
Load average counts processes waiting for CPU time. On a server with 2 CPU cores, a load of 2.0 means the cores are fully busy. A load of 4.0 on the same server means work is queuing. Compare the number to your core count, which you can see with nproc, before you decide anything is wrong.
top shows the same load plus a live list of processes sorted by CPU use. Press q to quit. Press M to sort by memory instead of CPU. Press 1 to see each core separately. The header also shows total memory, free memory, and swap use, so one screen answers the first three questions about a slow server.
2. free: check memory before you blame the CPU
A server can crawl because it ran out of memory, not because the CPU is weak. The free command shows total, used, and available memory in a compact table.
free -h
Find where the disk went
3. df and du: check disk space
A full disk breaks more things than most admins expect: databases refuse writes, uploads fail, and log rotation stops. The df command shows free space per filesystem.
df -h
du -sh /var/log/*
du -sh /home/* | sort -h
df -h answers whether the disk is full. du answers where the space went. The second command sizes each item under /var/log, which is where runaway logs usually live. The third sizes each home folder and sorts the result so the biggest folder lands at the bottom.
List and stop processes
4. ps: list processes without the live screen
top is live and interactive. ps takes a snapshot you can filter, sort, and save. The aux flags show every process with its owner, CPU use, memory use, and full command.
ps aux | grep nginx
ps aux --sort=-%mem | head -15
The first command lists nginx processes. The second lists the 15 processes that use the most memory. That second form is the fastest way to answer the question of which process eats RAM right now.
5. kill: stop a process cleanly
Once you find a stuck process, kill stops it. Give it the process ID from ps or top. Start with the polite signal, then escalate only when the process ignores it.
kill 1234
kill -9 1234
Plain kill sends SIGTERM, which asks the process to shut down and clean up. kill -9 sends SIGKILL, which ends the process at once with no cleanup. Use SIGTERM first. A database killed with SIGKILL can leave files in a state that needs repair on the next start.
Read logs and manage services
6. journalctl: read service logs the fast way
Modern Linux services send their output to the system journal. journalctl reads it, with filters for one service, one time range, or one boot.
journalctl -u nginx.service -n 50 --no-pager
journalctl -u nginx.service --since "2026-11-09 08:00"
journalctl -b -p err
The first command shows the last 50 lines for nginx. The second shows lines since a given time. The third shows only errors from the current boot, which is a good first pass when you do not know which service failed.
7. systemctl: start, stop, and check services
systemctl is the front door to systemd, the service manager on most modern servers. These four subcommands cover daily work.
sudo systemctl status nginx
sudo systemctl restart nginx
sudo systemctl enable nginx
sudo systemctl is-enabled nginx
status shows whether the service runs and prints recent log lines. restart stops and starts it. enable wires it into boot so it returns after a reboot. is-enabled confirms that link exists. Run status before restart so you see the error first, and run it again after so you confirm the fix.
Test the network
8. ss: see which ports listen
When a site returns a connection error, check whether anything listens on the port. ss replaced the older netstat command and runs faster on busy servers.
ss -tlnp
ss -tlnp | grep 443
9. curl: test a site from the server itself
curl fetches a URL and prints the response. Run it from the server to test whether the app answers locally, even when the public route fails.
curl -I https://example.com
curl -s http://127.0.0.1:3000/health | head -c 500
The -I flag fetches only headers, which is enough to confirm the status code. A 200 means the app answers. A 502 from the proxy with a 200 from the local port points at the proxy config. A connection refused on the local port means the app itself is down. That split saves a lot of guessing.
10. tail: watch the end of a log file
Some apps still write plain log files instead of the journal. tail prints the last lines of a file, and the -f flag follows new lines as they arrive.
tail -n 100 /var/log/nginx/error.log
tail -f /var/log/nginx/error.log
The first command prints the last 100 lines of the nginx error log. The second follows it live. When a user reports an error at a known time, tail with a time filter is slower than journalctl, so check the journal first for systemd services and use tail for apps that write their own files.
Fix permissions and reach the server
11. chmod and chown: fix permissions without guessing
Permission errors cause a large share of deployment failures: an app cannot read its config, a web server cannot serve a file, an upload folder refuses writes. chmod sets permissions. chown sets ownership.
sudo chown -R www-data:www-data /var/www/mysite
sudo chmod 755 /var/www/mysite
sudo chmod 644 /var/www/mysite/index.html
Directories usually need 755 and files need 644. That pair lets the owner write while everyone else reads. Never use 777 to fix a permission error. It opens the file to every user on the server and hides the real ownership problem instead of fixing it.
12. ssh: reach the server and move files
ssh is the command that starts every other command on this list. It opens a secure shell on a remote server, and its key-based login is the standard for production machines.
ssh [email protected]
ssh -i ~/.ssh/id_ed25519 [email protected]
scp app.tar.gz [email protected]:/tmp/
The -i flag picks a specific key file. scp copies a file over the same secure connection. If you still log in with a password, switch to key-only login soon. Our SSH hardening checklist for production servers covers key setup, custom ports, and fail2ban in one pass.
These linux terminal commands for beginners repay a little deliberate practice. Run each one on a test server, read its manual page with man when a flag is unclear, and keep a short note of the forms you actually use. Server admin command line tools feel slow until they become habit, and habit comes from using them on real problems, not from reading a list twice.
Practice plan: one week to fluency
Keep learning the same way. The Linux server monitoring basics guide shows how to watch these numbers without logging in every day, and the top CLI tools for engineering workflow in 2026 list adds tools that pair well with the twelve commands above. If you want a routine for the numbers themselves, how to benchmark your VPS CPU, disk, and network gives you a baseline to compare against after any change.