Day 2 : Basic Linux Commands

Day 2 of #90DaysOfDevOps Challenge: Basic Linux Commands

Hi everyone! Today, on Day 2 of my #90DaysOfDevOps challenge, I learned some important Linux commands that help you work with files and folders easily. Here’s a simple breakdown:

Linux Directory Structure

🔍 Commands to List Files and Folders

  • ls: Shows the files and folders in your current location.

    Examples:

    • ls -l: Shows files and folders with extra details like size, date, and permissions.

    • ls -a: Shows all files, including hidden ones (files that start with a dot, like .hiddenfile).

    • ls *.sh: Lists all files with a .sh extension (like shell script files).

    • ls -i: Shows files and folders with index numbers (called inodes).

    • ls -d */: Lists only the folders (you can also specify patterns).

📂 Commands to Navigate Directories

  • pwd: Tells you where you are in the system (prints the current directory).

  • cd path_to_directory: Moves you to another folder.

  • cd ~ or just cd: Takes you back to your home folder.

  • cd -: Takes you to the last folder you were in.

  • cd ..: Moves you one step back to the parent folder.

  • cd ../..: Moves you two steps back.

📁 Commands to Create New Folders

  • mkdir directoryName: Creates a new folder.

    Examples:

    • mkdir newFile: Creates a new folder called newFile.

    • mkdir .NewFolder: Creates a hidden folder (adding a dot . makes it hidden).

    • mkdir new1 new2 new3 new4: Creates multiple folders at once.

    • mkdir /home/user/Mydirectory: Creates a new folder in a specific location (like /home/user/).

    • mkdir -p user/user1/user2/user3: Creates a nested folder structure (it makes all the folders inside each other if they don’t exist yet).


These basic Linux commands are really useful for organizing and navigating through files and folders. They’re a must-know for anyone working in DevOps!

That’s all for Day 2! Let’s keep learning. 💻🐧

#Day2 #DevOpsJourney #LinuxCommands #SimpleLearning #90DaysChallenge