Day 2 - Basics Linux command

Day 2 - Basics Linux command

ยท

3 min read

Introduction ๐Ÿ“š

Welcome to the world of Linux! ๐Ÿง If you're just starting your Linux journey, understanding the basics of Linux commands is a must. Fear not; we've got you covered! In this beginner's guide, we'll explore the fundamental Linux commands that will unlock the true potential of the command line. So, let's dive in and conquer the Linux command-line universe! ๐Ÿช

Essential Linux Commands for Command Line Mastery ๐Ÿš€

  1. Navigating the File System ๐Ÿ“‚

    ls: List files and directories in the current directory.

    cd: Change directory to navigate through the file system.

    pwd: Display the present working directory.

  2. File Operations ๐Ÿ“„

    touch: Create an empty file.

    cp: Copy files or directories.

    mv: Move or rename files or directories.

    rm: Remove files or directories.

  3. Working with Directories ๐Ÿ“

    mkdir: Create a new directory.

    rmdir: Remove an empty directory.

    tree: Display directory structure in a tree-like format.

  4. Viewing File Content ๐Ÿ‘€

    cat: Display the contents of a file.

    less: View file content interactively with pagination.

    head: Show the beginning of a file.

    tail: Display the end of a file. grep: Search for patterns in a file.

  5. Process Management โš™๏ธ

    ps: Show running processes.

    top: Monitor system processes in real time.

    kill: Terminate processes by ID or name.

  6. Networking and Connectivity ๐ŸŒ

    ping: Test network connectivity with a remote host.

    ifconfig: View and configure network interfaces (deprecated, use ip).

    ip: Manage network configurations, routing, and addresses.

  7. Package Management ๐Ÿ“ฆ

    apt: Manage packages on Debian-based systems like Ubuntu.

    yum: Manage packages on Red Hat-based systems like CentOS.

Task 1 โœ… : Check your present working directory.

To check your present working directory in Linux, you can use the "pwd" command. Open the terminal and simply type "pwd" followed by pressing the "Enter" key. The command will display the full path of the directory you are currently in. This will help you know where you are in the file system while navigating and executing commands.

Task 2 ๐Ÿ”: List all the files or directories including hidden files.

To list all the files and directories, including hidden files, in the current directory in Linux, you can use the "ls" command with the "-a" option.

Task 3 ๐Ÿ“‚: Create a nested directory A/B/C/D/E

To create a nested directory A/B/C/D/E in Linux, you can use the "mkdir" command with the "-p" option to create parent directories as needed. To visualize nested directories in a tree-like structure, utilize the "tree" command. However, before using it, ensure you have the "tree" command installed by running "sudo apt-get install tree".

Conclusion ๐ŸŽ‰

Congratulations on mastering Essential Linux Commands! ๐ŸŽ‰ You've gained crucial skills to navigate the command line with confidence and efficiency. From checking the present working directory to creating nested directories, you're now equipped to handle various tasks on your Linux system. ๐Ÿš€ Keep practicing and exploring to become a command-line pro! ๐Ÿ’ช Embrace the power of the Linux command line and let it lead you to new heights in your Linux journey. ๐ŸŒˆ Happy command-line adventures! ๐Ÿงโœจ

Stay in the loop with my latest insights and articles on cloud โ˜๏ธ and DevOps ๐Ÿš€ by following me on Hashnode, LinkedIn (www.linkedin.com/in/nishit1907), and GitHub (https://github.com/NISHIT-RAJANI).

Thank you for reading! ๐Ÿ™ Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

ย