Skip to main content

 🚀 𝗧𝗼𝗽 𝗟𝗶𝗻𝘂𝘅 𝗰𝗼𝗺𝗺𝗮𝗻𝗱𝘀 𝘂𝘀𝗲𝗳𝘂𝗹 𝗶𝗻 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗳𝗼𝗿 𝗗𝗲𝘃𝗼𝗽𝘀 𝗘𝗻𝗴𝗶𝗻𝗲𝗲𝗿🚀


Linux is the backbone of cloud computing, DevOps, and system administration. Mastering these essential Linux commands can help you troubleshoot, automate, and optimize infrastructure efficiently.


🔹 Basic File & Directory Commands


1️⃣ ls – List files & directories 

2️⃣ cd – Change directory

3️⃣ pwd – Show current directory

4️⃣ mkdir – Create a directory

5️⃣ rm -rf – Remove files & directories


🔹 File Management


6️⃣ touch – Create an empty file

7️⃣ cp – Copy files & directories

8️⃣ mv – Move or rename files

9️⃣ cat – View file contents

🔟 less – Paginated file viewing


🔹 Permissions & Ownership


1️⃣1️⃣ chmod – Change file permissions

1️⃣2️⃣ chown – Change file owner

1️⃣3️⃣ umask – Set default permissions


🔹 Process Management


1️⃣4️⃣ ps – View running processes

1️⃣5️⃣ top – Monitor system performance

1️⃣6️⃣ kill – Terminate processes

1️⃣7️⃣ pkill – Kill processes by name

1️⃣8️⃣ nice / renice – Adjust process priority


🔹 Networking Commands


1️⃣9️⃣ ping – Check network connectivity

2️⃣0️⃣ netstat -tulnp – View open ports

2️⃣1️⃣ ip a – Check IP address

2️⃣2️⃣ nslookup – Query DNS records


🔹 Disk & Storage Management


2️⃣3️⃣ df -h – Check disk space

2️⃣4️⃣ du -sh folder/ – Check directory size

2️⃣5️⃣ mount – Mount filesystems


🔹 User Management


2️⃣6️⃣ whoami – Show current user

2️⃣7️⃣ id – Display user ID & group ID

2️⃣8️⃣ who – List logged-in users

2️⃣9️⃣ passwd – Change password

3️⃣0️⃣ su – Switch user


🔹 Logs & Monitoring


3️⃣1️⃣ uptime – Show system uptime

3️⃣2️⃣ dmesg – View system logs

3️⃣3️⃣ journalctl – Check systemd logs

3️⃣4️⃣ tail -f /var/log/syslog – Monitor logs live


🔹 Package Management


3️⃣5️⃣ apt / yum / dnf – Install packages

3️⃣6️⃣ rpm -q – Query installed RPM packages

3️⃣7️⃣ dpkg -l – List installed Debian packages


🔹 Advanced Commands


3️⃣8️⃣ crontab -e – Schedule tasks

3️⃣9️⃣ systemctl – Manage services

4️⃣0️⃣ tar -cvf backup.tar /dir – Create an archive

4️⃣1️⃣ grep – Search for patterns

4️⃣2️⃣ find – Locate files


🔹 Special Commands for DevOps


4️⃣3️⃣ docker ps – List running containers

4️⃣4️⃣ kubectl get pods – View Kubernetes pods

4️⃣5️⃣ ansible-playbook – Run Ansible automation scripts


🔹 Miscellaneous Commands


4️⃣6️⃣ alias – Create command shortcuts

4️⃣7️⃣ history – View command history

4️⃣8️⃣ env – Show environment variables

4️⃣9️⃣ echo $PATH – Display system path

5️⃣0️⃣ exit – Log out of a session


Basic LINUX Commands 

📂 File Management & Navigation

🔹 ls – List files and directories
🔹 ls -l – List with detailed info
🔹 ls -la – Include hidden files
🔹 cd dir – Change to directory
🔹 cd .. – Move to the parent directory
🔹 cd /dir – Change to an absolute path
🔹 cd – Go to home directory
🔹 pwd – Print current directory
🔹 mkdir dir – Create a directory
🔹 rm file – Delete a file
🔹 rm -f file – Force delete file
🔹 rm -r dir – Delete a directory
🔹 rm -rf dir – Force remove directory
🔹 cp file1 file2 – Copy file
🔹 mv file1 file2 – Rename file
🔹 mv file dir/ – Move file to directory
🔹 touch file – Create/update file
🔹 cat file – View file contents
🔹 tail -f file – View file as it updates


---

🌐 Networking

🔹 ping host – Check connectivity
🔹 whois domain – Get domain info
🔹 dig domain – Get DNS records
🔹 wget file – Download file
🔹 wget -c file – Resume download
🔹 curl URL – Fetch webpage content
🔹 ssh user@host – Remote login


---

⚙ System Info

🔹 date – Show date/time
🔹 uptime – System uptime
🔹 whoami – Show current user
🔹 w – Who is online
🔹 cat /proc/cpuinfo – CPU details
🔹 cat /proc/meminfo – Memory info
🔹 free – Check RAM usage
🔹 du -sh – Show directory size
🔹 df -h – Disk space usage
🔹 uname -a – Kernel info


---

📦 Compression

🔹 tar -cf file.tar files/ – Create archive
🔹 tar -xf file.tar – Extract archive
🔹 tar -tf file.tar – List archive contents


---

🔐 Permissions

🔹 chmod 777 file – Full access for all
🔹 chmod 755 file – rwx for owner, rx for others


---

🛠 Process Management

🔹 ps – View running processes
🔹 ps aux – Detailed process list
🔹 kill PID – Kill a process
🔹 killall process – Kill all instances
🔹 grep "pattern" file – Search for text
🔹 locate file – Find a file
🔹 whereis app – Locate application
🔹 man command – Get command manual

*****Essential Linux Commands for DevOps*****

System Analysis:
• htop - Interactive process viewer with CPU, memory, and load metrics
• netstat -tulpn - Display active network connections and listening ports
• ps aux | grep - Filter and find specific running processes
• lsof - List open files and processes using them
• dmesg - Display kernel-related messages and system logs

File Management:
• find . -name - Search files recursively by name or pattern
• rsync - Efficient file transfer and synchronization tool
• tar -xvf - Extract compressed archives
• grep -r - Search text patterns recursively in files
• sed -i - Stream editor for inline text modifications

Container & Orchestration:
• docker stats - Real-time container resource usage
• docker logs -f - Stream container logs live
• kubectl get pods - List Kubernetes pod status
• crictl pods - Low-level container runtime inspection

Monitoring & Logs:
• tail -f - Follow file updates in real-time
• watch - Execute commands periodically
• vmstat - Report virtual memory statistics
• journalctl - Query systemd journal logs

Network Tools:
• curl -v - HTTP request debugging with headers
• dig - DNS lookup utility
• ss - Socket statistics
• nc - Network testing and data transfer

Performance:
• strace - Trace system calls and signals
• tcpdump - Capture and analyze network traffic
• perf - Performance analysis tools
• sar - Collect and report system activity

System Control:
• systemctl - Control systemd services and units
• chmod/chown - Manage file permissions and ownership
• du -sh - Summarize directory sizes
• screen/tmux - Terminal session management

Comments

Popular posts from this blog

Quick Guide to VCF Automation for VCD Administrators

  Quick Guide to VCF Automation for VCD Administrators VMware Cloud Foundation 9 (VCF 9) has been  released  and with it comes brand new Cloud Management Platform –  VCF Automation (VCFA)  which supercedes both Aria Automation and VMware Cloud Director (VCD). This blog post is intended for those people that know VCD quite well and want to understand how is VCFA similar or different to help them quickly orient in the new direction. It should be emphasized that VCFA is a new solution and not just rebranding of an old one. However it reuses a lot of components from its predecessors. The provider part of VCFA called Tenenat Manager is based on VCD code and the UI and APIs will be familiar to VCD admins, while the tenant part inherist a lot from Aria Automation and especially for VCD end-users will look brand new. Deployment and Architecture VCFA is generaly deployed from VCF Operations Fleet Management (former Aria Suite LCM embeded in VCF Ops. Fleet Management...
  Issue with Aria Automation Custom form Multi Value Picker and Data Grid https://knowledge.broadcom.com/external/article?articleNumber=345960 Products VMware Aria Suite Issue/Introduction Symptoms: Getting  error " Expected Type String but was Object ", w hen trying to use Complex Types in MultiValue Picker on the Aria for Automation Custom Form. Environment VMware vRealize Automation 8.x Cause This issue has been identified where the problem appears when a single column Multi Value Picker or Data Grid is used. Resolution This is a known issue. There is a workaround.  Workaround: As a workaround, try adding one empty column in the Multivalue picker without filling the options. So we can add one more column without filling the value which will be hidden(there is a button in the designer page that will hide the column). This way the end user will receive the same view.  
  "Cloud zone insights not available yet, please check after some time" message on Aria Automation https://knowledge.broadcom.com/external/article?articleNumber=314894 Products VMware Aria Suite Issue/Introduction Symptoms: The certificate for Aria operations has been replaced since it was initially added to Aria Automation as an integration. When accessing the Insights pane under  Cloud Assembly  ->  Infrastructure  ->  Cloud Zone  ->  Insights  the following message is displayed:   "Cloud zone insights not available yet, please check after some time." The  /var/log/services-logs/prelude/hcmp-service-app/file-logs/hcmp-service-app.log  file contains ssl errors similar to:   2022-08-25T20:06:43.989Z ERROR hcmp-service [host='hcmp-service-app-xxxxxxx-xxxx' thread='Thread-56' user='' org='<org_id>' trace='<trace_id>' parent='<parent_id>' span='<span_id>'] c.v.a.h.a.common.AlertEnu...