Linux Tutorials

Essential Linux Commands Every Server Admin Needs

The 40 most important Linux commands — file management, process control, networking, and system monitoring.

Published Jan 25, 2025Updated May 20, 202612 min readBeginner
Table of Contents

File & Directory Management

CommandDescription
ls -laList all files including hidden, with permissions
cd /pathChange directory
pwdShow current directory path
mkdir -p dir/subCreate directory and parents
cp -r src destCopy files/directories recursively
mv src destMove or rename files
rm -rf /pathDelete files/folders (no confirmation!)
find / -name "*.log"Search for files by name
cat file.txtDisplay file contents
tail -f /var/log/syslogStream live log output
grep -r "error" /var/logSearch file contents recursively

System Monitoring

CommandDescription
top / htopLive process monitor (install htop: apt install htop)
df -hDisk usage by filesystem
du -sh /var/*Folder sizes
free -hRAM and swap usage
uptimeSystem uptime and CPU load average
ps aux --sort=-%cpuAll processes sorted by CPU usage
kill -9 PIDForce-kill a process
journalctl -fLive system log stream
journalctl -u nginxLogs for a specific service

Networking

ip addr                           # Show all IP addresses
ip route                          # Show routing table
ping 8.8.8.8                      # Test connectivity
curl -I https://Power Down.in      # Check HTTP headers
ss -tlnp                          # Show listening ports and processes
netstat -tlnp                     # Same (older systems)
traceroute 8.8.8.8                # Trace network path
dig Power Down.in                  # DNS lookup
nslookup Power Down.in             # Alternative DNS lookup
wget https://example.com/file.zip # Download a file

Package Management (Ubuntu/Debian)

apt update                    # Refresh package index
apt upgrade -y                # Upgrade all packages
apt install nginx -y          # Install a package
apt remove nginx              # Remove a package (keep config)
apt purge nginx               # Remove package AND config
apt autoremove -y             # Remove unused dependencies
apt search nginx              # Search for packages
dpkg -l | grep nginx          # Check if installed

File Permissions

chmod 755 /var/www             # rwxr-xr-x
chmod 644 /var/www/index.html  # rw-r--r--
chmod 600 ~/.ssh/id_ed25519    # rw------- (private key)
chown -R www-data:www-data /var/www/html  # Change ownership
Linuxcommandsterminaladmin
Was this article helpful?

Join Our Discord

Connect with our community of gamers and developers

Get instant support, share experiences, and stay updated with the latest news

Join Us On Discord
2026 VPS SaleLIMITED TIME
View Sale Plans