Files & directories
| ls -la | List all files, including hidden ones, with details. |
| cd /path | Change directory. |
| cp -r src dest | Copy a directory recursively. |
| mv old new | Move or rename a file/directory. |
| rm -rf folder | Delete a folder and its contents (use with care). |
| find . -name "*.log" | Find files by name pattern. |
| du -sh folder | Show folder size, human-readable. |
Permissions
| chmod 755 file | Set rwxr-xr-x permissions. |
| chown user:group file | Change file owner and group. |
| sudo -i | Switch to root shell. |
Processes
| ps aux | List all running processes. |
| top / htop | Live view of system resource usage. |
| kill -9 PID | Force-kill a process by ID. |
| systemctl status nginx | Check the status of a service. |
| systemctl restart nginx | Restart a service. |
Networking
| ip a | Show network interfaces and IP addresses. |
| ping example.com | Test connectivity to a host. |
| curl -I https://example.com | Fetch HTTP response headers only. |
| ss -tulpn | List listening ports and the processes using them. |
| ufw allow 443/tcp | Open a port in the UFW firewall. |
Package management (Ubuntu/Debian)
| apt update && apt upgrade | Update package lists and installed packages. |
| apt install nginx | Install a package. |
| apt remove package | Remove a package. |
Logs & monitoring
| tail -f /var/log/nginx/error.log | Follow a log file in real time. |
| journalctl -u nginx -f | Follow logs for a systemd service. |
| df -h | Show disk usage. |
| free -h | Show memory usage. |
Need someone to actually manage your Linux server?
Request a quote →