One command a day
One command a day.
One server command each morning: what it does, what you will see, when to use it, and the mistake to avoid. Written from a Hostinger KVM 8 that runs 45 websites and 13 apps. RSS.
- 6 Oct 2026 How do I see the last logins to my Linux server?
Use last -n 20 to list the 20 most recent logins to your Linux server, see who logged in, from where and for how long. - 5 Oct 2026 How do I see which IPs fail2ban has banned?
Use sudo fail2ban-client status sshd to list the IPs fail2ban has banned from SSH, how many failed logins it has seen, and what each number means. - 3 Oct 2026 How do I list ufw firewall rules with numbers on Ubuntu?
Use sudo ufw status numbered to see every firewall rule on Ubuntu with an index you can pass to ufw delete or ufw insert. - 28 Sep 2026 How do I list all my SSL certificates and their expiry dates with certbot?
Run sudo certbot certificates to list every Let's Encrypt certificate on your server, the domains each one covers and how many days until it expires. - 25 Sep 2026 How do I test that certbot can renew my SSL certificate?
Run sudo certbot renew --dry-run to prove every Let's Encrypt certificate on your server can renew, before one expires and takes a site down. - 24 Sep 2026 How do I check a website's SSL certificate from the command line?
Use openssl s_client to check a website's certificate chain, expiry dates and trust status from the Linux command line. - 23 Sep 2026 How do I query a specific DNS server with dig?
Use dig example.com @1.1.1.1 to ask one named resolver for a DNS record, so you can spot propagation lag after changing a record. - 22 Sep 2026 How do I check what a domain resolves to from the command line?
Use dig +short to see which IP address a domain points to right now, read the output, and know why a fresh DNS change can still show the old address. - 21 Sep 2026 How do I measure a website's response time from the command line?
Use curl to print a site's HTTP status code and total response time in one line, and learn how to read the numbers. - 20 Sep 2026 How do I check a website's status code and headers from the command line?
Use curl -I to see a site's HTTP status code, redirects and response headers straight from the terminal, with no browser or cache in the way. - 19 Sep 2026 How do I check if a service is running on Linux?
Use systemctl status to see whether a service like nginx is running on Ubuntu, when it stopped and the last log lines that explain why. - 18 Sep 2026 How do I read a service's logs for the last hour on Linux?
Read the last hour of any systemd service's logs on Ubuntu with journalctl -u and --since, and learn what the output means. - 17 Sep 2026 How do I watch CPU and memory per process on Linux?
Use htop to watch CPU and memory use per process on an Ubuntu VPS, sort by memory, and find the app that is eating your server. - 16 Sep 2026 How do I check memory usage on a Linux server?
Use free -m to see how much RAM your Linux server really has spare, and why the low free column is not the number to worry about. - 15 Sep 2026 How do I find what is using disk space on Linux?
Use du -sh * with sort -h to list every folder by size and find what is eating the disk on an Ubuntu VPS. - 14 Sep 2026 How do I check disk space on a Linux server?
Use df -h to see how much disk space is used and free on your Linux VPS, and catch a filling disk before it takes your sites down. - 13 Sep 2026 How do I make PM2 apps start again after a reboot?
Use pm2 save and pm2 startup to register PM2 with systemd on Ubuntu so your Node apps come back on their own after a reboot. - 12 Sep 2026 How do I restart one app with PM2 after a deploy?
Use pm2 restart appname to restart a single Node app after a deploy, check the output, and avoid the environment variable gotcha. - 11 Sep 2026 How do I read the last 100 lines of a PM2 app's logs?
Use pm2 logs appname --lines 100 to read the last 100 lines of one Node app's output under PM2, then follow new lines as they arrive. - 10 Sep 2026 How do I see all my Node apps running under PM2?
Use pm2 list to see every Node app on your VPS with its status, memory, CPU and restart count in one table. - 9 Sep 2026 How do I watch the nginx error log in real time?
Use tail -f on the nginx error log to watch errors appear live while you reproduce a 502, 504 or missing file problem on your Ubuntu VPS. - 8 Sep 2026 How do I reload nginx without dropping connections?
Apply nginx configuration changes on Ubuntu without dropping a single connection using systemctl reload nginx, with the output explained. - 7 Sep 2026 How do I test my nginx config before reloading it?
Use nginx -t to check your nginx configuration for syntax errors before you reload, so a typo cannot take every site on your server offline. - 6 Sep 2026 How do I see which process is using a port on Linux?
Use ss -ltnp on Ubuntu to list every listening TCP port and the process behind it, read the output, and fix 'address already in use' errors.