• Contact
  • About Me
  • Privacy Policy
  • Disclaimer
DefenceDev
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
    • Bash Scripts
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
  • Web Tools
No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
    • Bash Scripts
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
  • Web Tools
No Result
View All Result
DefenceDev
No Result
View All Result
Home Linux Tutorials

My Ultimate Linux/Ubuntu Commands Cheat Sheet (2025)

by neo
November 28, 2025
in Linux Tutorials
0
My Ultimate Linux/Ubuntu Commands Cheat Sheet (2025)

My Ultimate Linux/Ubuntu Commands Cheat Sheet (2025)

0
SHARES
570
VIEWS
Share on FacebookShare on LinkedIn
Table of Contents
  • My Ultimate Linux/Ubuntu Commands Cheat (2025)
    • File and Directory Management
    • Permissions and Ownership
    • Package Management (APT)
    • User and Group Management
    • System Monitoring and Performance
    • Networking
    • Process Management
    • Disk and Filesystem
    • Service Management (systemd)
    • Logs and Troubleshooting
    • Scheduled Tasks
    • SSH and Remote Access
    • Compression and Archiving
    • Text Processing and Search
    • Scripting and Automation
    • System Information
  • Conclusion

My Ultimate Linux/Ubuntu Commands Cheat (2025)

Whether you’re a beginner or an experienced sysadmin, using the Linux command line efficiently is a core skill. This comprehensive Linux/Ubuntu cheat sheet is designed to help you find the right command faster, grouped by category for everyday usage – from file management to networking, services, scripting, and more.

Bookmark it, print it, or save it – and make your terminal life easier.

File and Directory Management

Navigating the filesystem and organizing files is one of the most frequent tasks in Linux. These commands will help you move around, create, delete, and search files and directories with ease.

CommandDescription
lsList files and directories.
ls -lLong listing format.
ls -aInclude hidden files.
cd /pathChange directory.
cd ..Move up one level.
pwdPrint current working directory.
mkdir nameCreate a new directory.
mkdir -p /a/b/cCreate nested directories.
rm fileRemove a file.
rm -r folderRemove a directory and its contents.
cp source destCopy file.
cp -r dir1 dir2Copy directories recursively.
mv source destMove or rename file/directory.
touch fileCreate empty file or update timestamp.
find . -name "*.log"Find files by name.
treeDisplay directory tree (requires install).
du -sh *Show folder sizes in human-readable format.
df -hDisk space usage in human-readable format.

Related tutorials you may find useful:

  • Find and Execute Commands on Found Files
  • Move, Remove, and Copy Files and Directories (mv, rm, cp)
  • Create and View Files (touch, cat, less, find)
  • Navigation and Directory Management (cd, pwd, mkdir)

Permissions and Ownership

Controlling who can read, write, or execute a file is critical in multi-user systems. These commands help manage file and directory access rights.

CommandDescription
chmod 755 fileSet file permissions.
chmod -R 755 dirSet permissions recursively.
chown user fileChange file ownership.
chown user:group fChange user and group ownership.
stat fileView file permission details.
umaskShow default permissions for new files.

Related tutorials you may find useful:

  • Linux Permissions and Ownership – Full Command List

Package Management (APT)

Keeping your system up-to-date or installing new tools? These are the go-to commands for managing software packages on Ubuntu-based systems.

CommandDescription
sudo apt updateUpdate package list.
sudo apt upgradeUpgrade all packages.
sudo apt install pkgInstall package.
sudo apt remove pkgRemove package.
sudo apt autoremoveRemove unused dependencies.
dpkg -i file.debInstall a .deb package manually.
apt-mark showmanualList manually installed packages.
snap listList Snap packages.
snap install <package>Install Snap package.

Related tutorials you may find useful:

  • How to Remove Applications Using apt-get from an Ubuntu Server
  • How to Remove Applications from an Ubuntu Server Using dpkg
  • Remove Applications from Ubuntu Server Using Snap
  • How to Remove an Application from an Ubuntu Server Manually

User and Group Management

Every Linux system involves managing users and permissions. Here’s how to add, modify, and remove users and groups.

CommandDescription
adduser userAdd a new user.
passwd userSet/change user password.
usermod -aG group userAdd user to group.
groups userShow user’s groups.
id userDisplay UID, GID, groups.
deluser userDelete user.
groupadd groupAdd a new group.

System Monitoring and Performance

Need to check memory usage or find what’s eating up CPU? These commands provide real-time system performance metrics.

CommandDescription
topLive system monitor.
htopEnhanced interactive monitor (install separately).
ps auxView all running processes.
free -hShow memory usage.
uptimeShow system uptime and load average.
vmstatReport system performance.
iostatReport CPU/disk stats. Requires sysstat package.
watch <cmd>Repeat a command every 2 seconds.

Monitoring your system’s performance is key to ensuring stability and identifying issues before they impact uptime. Tools like htop, atop, nload, and iostat offer real-time insights into resource usage, helping administrators quickly detect and resolve problems.

Recommended reading:

  • Real-Time Performance Metrics with htop, atop, nload and iostat

Networking

From checking IP addresses to DNS lookups, these commands help you understand and troubleshoot your system’s network configuration.

CommandDescription
ip aShow IP addresses.
ip rShow routing table.
ping hostSend ICMP packets to host.
traceroute hostShow route to host.
netstat -tulnpShow listening ports (deprecated in favor of ss).
ss -tulnShow active listening sockets.
curl urlFetch web content.
wget urlDownload file from web.
dig domainDNS lookup.
nslookup domainDNS query (older tool).

Linux provides robust tools for configuring, monitoring, and troubleshooting network interfaces and services. Understanding how to manage interfaces, analyze active ports, and work with modern tools like Netplan is essential for any system administrator.

Recommended reading:

  • Linux Networking: Display Listening Ports and Listening Services
  • Linux Networking: ifconfig – Managing Network Interfaces on Ubuntu
  • Linux Networking: Netplan DHCP Configuration

Process Management

Sometimes you need to check, stop, or prioritize running processes. These commands let you manage what’s running on your system.

CommandDescription
ps auxList all running processes.
kill PIDKill process by PID.
killall nameKill all processes with the given name.
nice -n 10 cmdRun command with adjusted priority.
renice PIDChange priority of running process.
jobsList background jobs.
bg, fgResume jobs in background/foreground.

Recommended reading:

  • Linux Process: List All Running Services with ps Command
  • Ubuntu Process Management: Kill Command
  • How to Kill All Processes Using wget on Linux

Disk and Filesystem

Keep your storage under control with these commands for managing partitions, mounting, and checking space usage.

CommandDescription
lsblkList block devices.
mount /dev/sdX /mntMount device.
umount /mntUnmount device.
blkidDisplay block device attributes.
fdisk -lList partitions.
mkfs.ext4 /dev/sdXFormat partition as ext4.
tune2fsModify ext2/ext3/ext4 filesystem parameters.

Recommended reading:

  • Solutions: Add New HDD to Ubuntu

Service Management (systemd)

Services (daemons) are core components in Linux. Use these commands to control background services on systemd-based systems.

CommandDescription
systemctl start serviceStart a service.
systemctl stop serviceStop a service.
systemctl restart serviceRestart a service.
systemctl status serviceShow service status.
systemctl enable serviceEnable service at boot.
systemctl disable serviceDisable service from autostart.
journalctl -xeShow detailed logs.

Logs and Troubleshooting

Logs are your best friends when diagnosing system issues. These commands will help you inspect logs and track down errors.

CommandDescription
journalctl -xeShow system logs with extra detail.
dmesgKernel ring buffer (boot and device logs).
tail -f /var/log/syslogLive log tailing.
less /var/log/auth.logView login-related logs.
grep "error" logfileSearch for errors in a log file.

Scheduled Tasks

Automating tasks is easy in Linux. Use cron and systemd timers to schedule scripts or commands.

CommandDescription
crontab -eEdit current user’s crontab.
crontab -lList cron jobs.
at 10:00Run a one-time command at a specified time.
systemctl list-timersShow systemd timers.

SSH and Remote Access

Securely access and manage remote systems using SSH. These commands cover key generation, file transfer, and connections.

CommandDescription
ssh user@hostConnect to remote system.
scp file user@host:/pathCopy file over SSH.
rsync -avz src/ user@host:/pathSync files over SSH.
ssh-keygenGenerate SSH key pair.
ssh-copy-id user@hostCopy SSH key to remote host.

Recommended reading:

  • Passwordless SSH Login Ubuntu

Compression and Archiving

Need to archive or compress files? These are essential tools for working with .tar, .zip, and other compressed formats.

CommandDescription
tar -czf archive.tar.gz dirCreate a compressed archive.
tar -xzf archive.tar.gzExtract a .tar.gz archive.
zip -r archive.zip dirCreate a .zip archive.
unzip archive.zipExtract .zip file.
gzip fileCompress a file.
gunzip file.gzDecompress a file.

Text Processing and Search

Linux shines in text manipulation. With these commands, you can filter, search, and reformat text from files or input.

CommandDescription
cat fileDisplay file contents.
less fileView large files with navigation.
head -n 10 fileShow first 10 lines.
tail -n 10 fileShow last 10 lines.
grep "word" fileSearch for word in file.
cut -d':' -f1 /etc/passwdExtract fields using delimiter.
awk '{print $1}'Print column with awk.
sed 's/foo/bar/g'Replace text using sed.

Recommended reading:

  • File Operation: grep Text Search

Scripting and Automation

Automate repetitive tasks using shell scripts. These basic scripting examples will help you get started.

Syntax/CommandDescription
#!/bin/bashDefine script interpreter.
for i in {1..5}; do ...; doneSimple loop.
if [ -f file ]; then ...; fiFile existence check.
chmod +x script.shMake script executable.
./script.shRun the script.

System Information

Quickly gather system specs, user sessions, and OS version using these handy commands.

CommandDescription
uname -aKernel version and architecture.
lsb_release -aUbuntu version info.
hostnamectlShow hostname and OS details.
whoList logged in users.
lastShow login history.

Conclusion

This Linux/Ubuntu cheat sheet includes the most useful and commonly used commands to manage your system efficiently. Whether you’re maintaining servers, developing applications, or just learning Linux, having quick access to the right commands can save you time and effort.

Bookmark this page or export it to PDF/Word for offline use.
Want more advanced tips? Stay tuned for upcoming articles on Bash scripting, security hardening, and automation.

Tags: linux
Previous Post

My Ultimate Docker Commands Cheat Sheet (2025 Edition)

Next Post

My Way to Organize a Git Repository for Bash, Mikrotik, FortiGate and other Scripts

neo

Related Posts

Terminal Colors in Bash: How and When to Use Them
Linux Tutorials

Terminal Colors in Bash: How and When to Use Them

10+ Useful Linux find Command Examples You Should Know
Commands

10+ Useful Linux find Command Examples You Should Know

Server Reboot with Ansible
Linux Tutorials

Automating Linux Server Reboot with Ansible

GitHub: How to Add a Script or a Folder to Your Repository
Linux Tutorials

GitHub: How to Add a Script or a Folder to Your Repository

Linux Networking: Display Open Ports and Listening Services
Networking

Linux Networking: Display Open Ports and Listening Services

List Installed Packages on Linux
Linux Tutorials

List Installed Linux Packages

Next Post
My Way to Organize a Git Repository for Bash, Mikrotik, FortiGate and other Scripts

My Way to Organize a Git Repository for Bash, Mikrotik, FortiGate and other Scripts

Recommended

WordPress: Installation on Ubuntu 22.04

WordPress: Installation on Ubuntu 22.04

My Top 5 Applications to Run on Raspberry Pi with Ubuntu

My Top 5 Applications to Run on Raspberry Pi with Ubuntu (2026)

Terminal Colors in Bash: How and When to Use Them

Terminal Colors in Bash: How and When to Use Them

Solution: Ubuntu Internet Connection Monitoring Script (Create a Log File, Possible to Send per Email)

Ubuntu Internet Connection Monitoring Script: Log Creation and Email Alerts

DefenceDev Public GitHub: Scripts & Automation

DefenceDev Public GitHub: Scripts & Automation

Categories

  • Blog
  • Cloud
    • Private
  • Linux Tutorials
    • Bash Scripting Tutorials
    • Commands
    • Networking
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Solutions
    • Docker
  • Video Tutorials
    • MikroTik Videos
  • Web Tools

DefenceDev Tutorials

defencedev Logo

Whether you’re just starting or looking to expand your skills, I hope you find useful information and engaging discussions here. Let me take you through my journey and the goals behind this space!

Follow Us

Recent News

Terminal Colors in Bash: How and When to Use Them

Terminal Colors in Bash: How and When to Use Them

Solution: Ubuntu Internet Connection Monitoring Script (Create a Log File, Possible to Send per Email)

Ubuntu Internet Connection Monitoring Script: Log Creation and Email Alerts

  • Site Map
  • Privacy Policy
  • Facebook Page
  • GitHub
  • Disclaimer
  • Contact
  • About Me

© 2025 defencedev.com - All rights reserved.

No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
    • Bash Scripts
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
  • Web Tools

© 2025 defencedev.com - All rights reserved.