Free reference

Linux Command Cheat Sheet.

The commands I actually use every day when setting up and managing Linux servers.

Files & directories

ls -laList all files, including hidden ones, with details.
cd /pathChange directory.
cp -r src destCopy a directory recursively.
mv old newMove or rename a file/directory.
rm -rf folderDelete a folder and its contents (use with care).
find . -name "*.log"Find files by name pattern.
du -sh folderShow folder size, human-readable.

Permissions

chmod 755 fileSet rwxr-xr-x permissions.
chown user:group fileChange file owner and group.
sudo -iSwitch to root shell.

Processes

ps auxList all running processes.
top / htopLive view of system resource usage.
kill -9 PIDForce-kill a process by ID.
systemctl status nginxCheck the status of a service.
systemctl restart nginxRestart a service.

Networking

ip aShow network interfaces and IP addresses.
ping example.comTest connectivity to a host.
curl -I https://example.comFetch HTTP response headers only.
ss -tulpnList listening ports and the processes using them.
ufw allow 443/tcpOpen a port in the UFW firewall.

Package management (Ubuntu/Debian)

apt update && apt upgradeUpdate package lists and installed packages.
apt install nginxInstall a package.
apt remove packageRemove a package.

Logs & monitoring

tail -f /var/log/nginx/error.logFollow a log file in real time.
journalctl -u nginx -fFollow logs for a systemd service.
df -hShow disk usage.
free -hShow memory usage.

Need someone to actually manage your Linux server?

Request a quote