HOME BLOGS ABOUT CONTACT

Essential Ubuntu Server Commands Every Admin Should Know

tania andrew Suresh Thapa
| 21 Aug, 2025 | 609 views
0
0
Essential Ubuntu Server Commands Every Admin Should Know

Essential Ubuntu Server Commands Every Admin Should Know

 

If you’re running Ubuntu Server (24.04 or any Linux server), there are a set of essential commands everyone should know to manage, troubleshoot, and secure the system.

 

step by step guide to install ubuntu server 24.04

 

I’ll break them into categories so you can learn step by step instead of just dumping a list.

 

1. System Information & Monitoring

CommandWhat it does
uname -aShow kernel version & system info
hostnamectlShow or set system hostname
lsb_release -aShow Ubuntu version
uptimeShow how long server has been running
top / htopMonitor CPU/memory usage (htop is better)
free -hCheck RAM usage
df -hShow disk usage (human-readable)
du -sh *Show size of each directory/file
ip aShow all network interfaces & IP addresses
ss -tulnShow listening ports & services
journalctl -xeView detailed system logs

2. Package Management (APT)

CommandWhat it does
sudo apt updateUpdate package lists
sudo apt upgradeUpgrade all installed packages
sudo apt install <pkg>Install a package
sudo apt remove <pkg>Remove a package
sudo apt autoremoveRemove unused packages
`dpkg -lgrep <pkg>`

 

3. File & Directory Management

CommandWhat it does
ls -lhList files with size in human-readable format
cd /pathChange directory
pwdShow current directory
mkdir newdirCreate directory
rm fileDelete a file
rm -r dirDelete directory recursively
cp file1 file2Copy file
mv file1 file2Move/rename file
nano file / vim fileEdit a file
cat filePrint file contents
less fileView file contents (scrollable)
tail -f logfileWatch log file in real-time

 

4. User & Permission Management

CommandWhat it does
whoamiShow current user
idShow user/group info
adduser usernameAdd a new user
passwd usernameChange password
deluser usernameDelete user
groupsShow groups of current user
sudo usermod -aG group usernameAdd user to group (common: sudo usermod -aG sudo user)
chmod 644 fileChange file permissions
chown user:group fileChange file owner

 

5. Networking & SSH

CommandWhat it does
ping 8.8.8.8Test network connectivity
curl ifconfig.meShow public IP
ssh user@ipConnect to server via SSH
scp file user@ip:/pathCopy file over SSH
rsync -avz /src user@ip:/destSync files/directories

 

6. Process & Service Management

CommandWhat it does
ps auxgrep process
kill -9 PIDKill a process
systemctl status serviceCheck service status
sudo systemctl start serviceStart service
sudo systemctl stop serviceStop service
sudo systemctl restart serviceRestart service
sudo systemctl enable serviceEnable auto-start at boot
sudo systemctl disable serviceDisable auto-start

 

7. Security & Firewall

CommandWhat it does
sudo ufw statusShow firewall status
sudo ufw allow 22Allow SSH
sudo ufw deny 80Block port
sudo ufw enableEnable firewall
sudo fail2ban-client statusCheck Fail2Ban status (if installed)

 

8. Archiving & Transfers

CommandWhat it does
tar -czvf file.tar.gz dir/Compress directory
tar -xzvf file.tar.gzExtract archive
zip -r file.zip dir/Zip folder
unzip file.zipExtract zip
wget URLDownload file
curl -O URLDownload file (alternative)

 

9. Disk & Storage

CommandWhat it does
lsblkShow disks/partitions
mount /dev/sdX /mntMount disk
umount /mntUnmount disk
df -ThShow disk usage & filesystem type
blkidShow filesystem UUIDs

 

10. Power & Shutdown

CommandWhat it does
rebootReboot server
shutdown -h nowShutdown immediately
shutdown -r +5Reboot in 5 minutes

 

✅ If you master just these, you’ll cover 90% of what admins do daily.

 

 

Tags:

commands linux ubuntu

Comments

Please login to leave a comment.

No comments yet. Be the first to comment!