Skip to main content

💻 100 Essential Linux Commands for DevOps 🚀

 

💻 100 Essential Linux Commands for DevOps 🚀

Mastering Linux is a fundamental skill for DevOps engineers. Below is a comprehensive list of 100 essential Linux commands categorized into different sections to help you manage servers, automate tasks, and troubleshoot effectively.



🌍 Shape Your Future with AI & Infinite Knowledge...!!

🌐 Want to Generate Text-to-Voice, Images & Videos? 👉 http://www.ai.skyinfinitetech.com 📚 Read In-Depth Tech & Self-Improvement Blogs 👉 http://www.skyinfinitetech.com ▶ Watch Life-Changing Videos on YouTube 👉 https://www.youtube.com/@SkyInfinite-Learning 🔥 Transform Your Skills, Business & Productivity – Join Us Today! 🔥



1️⃣ Basic Linux Commands 🏁

✔️ pwd → Print current working directory
✔️ ls → List files and directories
✔️ cd <directory> → Change directory
✔️ mkdir <dir> → Create a new directory
✔️ rmdir <dir> → Remove an empty directory
✔️ rm -rf <dir/file> → Remove files or directories recursively
✔️ touch <file> → Create an empty file
✔️ cp <source> <destination> → Copy files and directories
✔️ mv <source> <destination> → Move or rename files
✔️ find <path> -name "<filename>" → Find files by name



2️⃣ File & Directory Permissions 🔐

✔️ ls -l → Show detailed file permissions
✔️ chmod 755 <file> → Change file permissions
✔️ chown user:group <file> → Change file owner
✔️ chgrp <group> <file> → Change group ownership
✔️ umask <value> → Set default file permissions



3️⃣ File Viewing & Editing 📄

✔️ cat <file> → Display file content
✔️ less <file> → View file content page by page
✔️ tail -f <file> → View last 10 lines of a file in real-time
✔️ head -n <num> <file> → Show first N lines of a file
✔️ nano <file> → Open file in Nano editor
✔️ vi <file> → Open file in Vi editor
✔️ sed 's/old/new/g' <file> → Replace text in a file
✔️ awk '{print $1}' <file> → Extract specific columns from a file



4️⃣ User Management 👤

✔️ whoami → Show current logged-in user
✔️ who → Show all logged-in users
✔️ id → Show user ID and group ID
✔️ adduser <username> → Create a new user
✔️ passwd <username> → Change user password
✔️ deluser <username> → Delete a user
✔️ usermod -aG <group> <username> → Add a user to a group



5️⃣ Process Management 🔄

✔️ ps aux → Show all running processes
✔️ top → Show real-time CPU & memory usage
✔️ htop → Interactive process viewer
✔️ kill <PID> → Kill a process by PID
✔️ killall <process> → Kill all processes by name
✔️ pkill -9 <process> → Force kill a process
✔️ nice -n <priority> <command> → Run a process with a priority
✔️ nohup <command> & → Run a process in the background



6️⃣ Disk Management 💾

✔️ df -h → Show disk usage in human-readable format
✔️ du -sh <dir> → Show disk usage of a directory
✔️ lsblk → List information about block devices
✔️ mount <device> <mount_point> → Mount a filesystem
✔️ umount <device> → Unmount a filesystem
✔️ fsck <device> → Check and repair a filesystem
✔️ mkfs.ext4 <device> → Format a partition with ext4 filesystem



7️⃣ Network Commands 🌐

✔️ ifconfig or ip a → Show network interface details
✔️ ping <host> → Check network connectivity
✔️ netstat -tulnp → Show open ports and listening services
✔️ ss -tulnp → Show active network connections
✔️ traceroute <host> → Show the path of packets
✔️ wget <URL> → Download a file from the internet
✔️ curl -I <URL> → Fetch HTTP headers from a URL
✔️ scp <file> user@host:/path/ → Securely copy files to a remote server
✔️ rsync -av <source> <destination> → Sync files between directories



8️⃣ Log Management 📜

✔️ tail -f /var/log/syslog → View system logs in real-time
✔️ journalctl -xe → View extended logs
✔️ grep "error" /var/log/syslog → Filter logs for errors
✔️ dmesg | less → View boot logs
✔️ cat /var/log/auth.log → Check authentication logs



9️⃣ Package Management 📦

🔹 Debian-based (Ubuntu, Debian)
✔️ apt update → Update package list
✔️ apt upgrade → Upgrade installed packages
✔️ apt install <package> → Install a package
✔️ apt remove <package> → Remove a package

🔹 RHEL-based (CentOS, Fedora)
✔️ yum update → Update package list
✔️ yum install <package> → Install a package
✔️ yum remove <package> → Remove a package



🔟 Services & Systemd Management ⚙️

✔️ systemctl start <service> → Start a service
✔️ systemctl stop <service> → Stop a service
✔️ systemctl restart <service> → Restart a service
✔️ systemctl enable <service> → Enable service on boot
✔️ systemctl status <service> → Show service status



1️⃣1️⃣ SSH & Remote Access 🔑

✔️ ssh user@host → Connect to a remote server
✔️ ssh -i key.pem user@host → Connect using SSH key
✔️ scp file.txt user@host:/path/ → Copy files securely
✔️ rsync -avz user@host:/path/ /local/path/ → Sync files remotely



1️⃣2️⃣ Scheduling Tasks (Cron Jobs) ⏳

✔️ crontab -e → Edit cron jobs
✔️ crontab -l → List scheduled cron jobs
✔️ echo "0 2 * * * /path/script.sh" | crontab - → Schedule a daily script



1️⃣3️⃣ Miscellaneous Useful Commands 🔥

✔️ alias ll='ls -lah' → Create a shortcut for commands
✔️ history | grep <command> → Search command history
✔️ echo $SHELL → Show current shell
✔️ date → Display current date and time
✔️ uptime → Show system uptime
✔️ env → Show environment variables
✔️ uname -r → Show Linux kernel version
✔️ shutdown -h now → Shutdown the system



📌 Summary & Next Steps 🚀

✔️ These 100 essential Linux commands will help you efficiently manage servers, automate tasks, and troubleshoot issues as a DevOps Engineer.
✔️ Now, let's deep dive into each section starting with Linux Basics in detail!

📢 Which topic should we cover next? Linux File System, User Management, or Networking? 🚀


Comments

Popular posts from this blog

Introduction to Terraform – The Future of Infrastructure as Code

  Introduction to Terraform – The Future of Infrastructure as Code In today’s fast-paced DevOps world, managing infrastructure manually is outdated . This is where Terraform comes in—a powerful Infrastructure as Code (IaC) tool that allows you to define, provision, and manage cloud infrastructure efficiently . Whether you're working with AWS, Azure, Google Cloud, or on-premises servers , Terraform provides a declarative, automation-first approach to infrastructure deployment. Shape Your Future with AI & Infinite Knowledge...!! Read In-Depth Tech & Self-Improvement Blogs http://www.skyinfinitetech.com Watch Life-Changing Videos on YouTube https://www.youtube.com/@SkyInfinite-Learning Transform Your Skills, Business & Productivity – Join Us Today! In today’s digital-first world, agility and automation are no longer optional—they’re essential. Companies across the globe are rapidly shifting their operations to the cloud to keep up with the pace of innovatio...

📊 Monitoring & Logging in Kubernetes – Tools like Prometheus, Grafana, and Fluentd

  Monitoring & Logging in Kubernetes – Tools like Prometheus, Grafana, and Fluentd Monitoring and logging are essential for maintaining a healthy and well-performing Kubernetes cluster. In this guide, we’ll cover why monitoring is important, key monitoring tools like Prometheus and Grafana, and logging tools like Fluentd to help you gain visibility into your cluster’s performance and logs. Shape Your Future with AI & Infinite Knowledge...!! Want to Generate Text-to-Voice, Images & Videos? http://www.ai.skyinfinitetech.com Read In-Depth Tech & Self-Improvement Blogs http://www.skyinfinitetech.com Watch Life-Changing Videos on YouTube https://www.youtube.com/@SkyInfinite-Learning Transform Your Skills, Business & Productivity – Join Us Today! 🚀 Introduction In today’s fast-paced cloud-native environment, Kubernetes has emerged as the de-facto container orchestration platform. But deploying and managing applications in Kubernetes is just half the ba...

🔒 Kubernetes Security – RBAC, Network Policies, and Secrets Management

  Kubernetes Security – RBAC, Network Policies, and Secrets Management Security is a critical aspect of managing Kubernetes clusters. In this guide, we'll cover essential security mechanisms like Role-Based Access Control (RBAC) , Network Policies , and Secrets Management to help you secure your Kubernetes environment effectively. Shape Your Future with AI & Infinite Knowledge...!! Want to Generate Text-to-Voice, Images & Videos? http://www.ai.skyinfinitetech.com Read In-Depth Tech & Self-Improvement Blogs http://www.skyinfinitetech.com Watch Life-Changing Videos on YouTube https://www.youtube.com/@SkyInfinite-Learning Transform Your Skills, Business & Productivity – Join Us Today! 🚀 Introduction: Why Kubernetes Security Is Non-Negotiable As Kubernetes becomes the backbone of modern cloud-native infrastructure, security is no longer optional—it’s mission-critical . With multiple moving parts like containers, pods, services, nodes, and more, Kuberne...