๐ŸŒŸ Day 2 of the #90DaysOfDevOps Challenge: Key Linux Commands for DevOps Engineers

Day 2 of my #90DaysOfDevOps journey with TrainWithShubham focused on mastering Linux commands. Linux is a cornerstone of DevOps, used to manage servers, cloud environments, and infrastructure automation. Letโ€™s break down the key commands I learned today.


๐Ÿ“ Using ls to List Files and Directories

The ls command is fundamental for listing the contents of a directory. It helps you see what files and folders are available to work with.

  • ls -l: Provides a detailed list, including file permissions, ownership, and size.

  • ls -a: Shows hidden files (those prefixed with a dot).

  • ls *.sh: Lists all .sh files, which are commonly used for shell scripts.

  • ls -i: Displays the inode numbers of files.

  • ls -d */: Filters the listing to display only directories.

bashCopy codels -l       # Detailed listing
ls -a       # Include hidden files
ls *.sh     # Show only shell scripts
ls -i       # List inode numbers
ls -d */    # List directories only

๐Ÿ“‚ Navigating with pwd and cd

Being able to move through directories quickly is essential in managing Linux environments.

  • pwd: Prints the working directory path.

  • cd path: Changes to the specified directory.

  • cd -: Returns to the previous directory.

  • cd ..: Moves one level up in the directory tree.

  • cd ~: Takes you back to the home directory.

bashCopy codepwd         # Print working directory
cd /path    # Change to specific directory
cd -        # Switch to the last directory
cd ..       # Move up one directory level
cd ~/       # Go to home directory

๐Ÿ“‚ Creating Directories with mkdir

The mkdir command is used to create directories, and itโ€™s useful when setting up environments or organizing files.

  • mkdir directoryName: Creates a new directory.

  • mkdir .hiddenDir: Creates a hidden directory (useful for configuration files).

  • mkdir -p A/B/C: Creates nested directories in one go.

bashCopy codemkdir projectFolder        # Create a directory
mkdir .configFolder        # Create a hidden directory
mkdir -p devOps/infra      # Create nested directories

๐Ÿ”ง Why Linux Commands Are Essential for DevOps

Linux commands form the backbone of infrastructure management. Whether itโ€™s working with AWS, Docker, or CI/CD pipelines, understanding these basic commands helps you interact with servers and cloud environments more efficiently.

As DevOps engineers, we work in Linux environments to automate processes, deploy software, and manage infrastructure at scale.


๐Ÿš€ Whatโ€™s Next?

Next, I'll be learning about file manipulation and advanced Linux commands to deepen my understanding of server management. Follow along for more insights from my #90DaysOfDevOps journey!

Letโ€™s continue learning and building together! ๐Ÿ”ฅ

#Linux #DevOps #CloudComputing #AWS #CLI #Infrastructure #Automation #90DaysOfDevOps #DevOpsSkills #TrainWithShubham

0
Subscribe to my newsletter

Read articles from Kanav Preet Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kanav Preet Singh
Kanav Preet Singh