Skip to main content

Command Palette

Search for a command to run...

Day 3 - Basic Linux CMD's

Published
β€’3 min read
Y

I am Yashraj Singh Sisodiya, a 3rd Year CSE student at SVVV, born and raised in Shujalpur. Currently residing in Indore, I'm passionate about pursuing a career in DevOps engineering. My tech journey began with an internship at Infobyte, honing my skills as an Android Developer intern. Alongside my academic pursuits, I actively participate in co-curriculars, holding roles as Technical Lead at Abhyudaya and Cloud Lead at GDSC SVVV, while also serving as an MLSA of my college.

I have a keen interest in Cloud Computing, demonstrated through projects such as User management and Backup using shell scripting Linux, Dockerizing applications, CI/CD with Jenkins, and deploying a 3-tier application on AWS. Always eager to learn, I'm committed to expanding my knowledge and skills in the ever-evolving tech landscape.

  1. To view what's written in a file :

    The cat command, short for "concatenate," is used to display the content of a file on the terminal. In simpler terms, it lets you see what is inside a file without modifying the file itself. When you use the cat command followed by the name of a file, it prints the contents of that file to the terminal.

cat fruit
  1. To view file Permissions:

    chmod stands for "change mode," and it is a command used in Unix-like operating systems (including Linux) to change the access permissions of files and directories. The chmod command allows you to control who can read, write, or execute a file.

ls -l

  1. To check which commands you have run till now:

  2. The history command in Unix-like operating systems, including Linux, is used to display a list of previously executed commands in the terminal. When you run commands in a terminal session, a history of those commands is typically maintained, allowing you to review and reuse them.

     history
    
  3. To create a fruits.txt file and to view the content.

  • The touch command is used in Unix-like operating systems (such as Linux) to create an empty file or update the access and modification timestamps of an existing file.

      touch fruit.txt
    

    1. To view and edit content:

      nano is a text editor for Unix-like operating systems, including Linux. It's designed to be a simple and user-friendly command-line text editor, suitable for users who may not be familiar with more complex text editors like Vi

       nano fruit.txt
      

      to save and exit from the editor mode use 'CTRL+X' then 'Y' Enter.

  1. Add content in fruit.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava.

    vim is a highly configurable text editor for Unix-like operating systems, including Linux. It stands for "Vi IMproved" and is an extended and improved version of the original vi text editor. vim is known for its powerful features, flexibility, and efficiency, making it a popular choice among developers, system administrators, and other users who work extensively with text files.

vim fruit.txt

want to Save or Quit use Esc:wq want to quit Direct with save Esc:q

  1. To Show only top three fruits from the file.

  1. The tail command is used in Unix-like operating systems, including Linux, to display the last few lines of a text file. It is often used to monitor log files or view updates in real-time.

     tail -n 3 fruit.txt
    

  1. Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey.

    To create a file named color.txt with seven colors in it, you can use a text editor or command-line tools. Here's an example using the echo command:

     echo "Red" > color.txt
     echo "Orange" >> color.txt
     echo "Yellow" >> color.txt
     echo "Green" >> color.txt
     echo "Blue" >> color.txt
     echo "Indigo" >> color.txt
     echo "Violet" >> color.txt
    

  2. To find the difference between fruits.txt and Colors.txt file.

    The diff command is used to display the differences between two text files. It highlights the lines that are unique to each file or shows the lines that differ between them. Here's the basic syntax:

     diff color.txt fruit.txt
    

More from this blog

Mastering DevOps: A Comprehensive Guide to Becoming a DevOps Engineer

39 posts

πŸš€ Welcome to the world of DevOps with Yashraj! 🌐

Hey tech enthusiasts! πŸ‘‹ I'm Yashraj, a dedicated third-year student pursuing Computer Science Engineering at SVVV Indore. Currently, I'm honing my πŸš€ Welcome to the world of DevOps with Yashraj! 🌐

Hey tech enthusiasts! πŸ‘‹ I'm Yashraj, a dedicated third-year student pursuing Computer Science Engineering at SVVV Indore. Currently, I'm honing my skills in the realm of DevOps, fueled by my passion for technology and innovation.

πŸ› οΈ My Tech Arsenal:

  • Docker
  • Linux
  • Kubernetes
  • Jenkins
  • AWS
  • Python
  • Java
  • Prometheus
  • Grafana
  • Ansible
  • Terraform

Join me in exploring the fascinating landscape of AWS DevOps technology. Let's embark on a journey of continuous learning and growth, embracing new challenges with enthusiasm and determination!

🀝 Connect with me for:

  • Engaging discussions
  • Shared learning experiences
  • Collaborative learning opportunities

Follow my journey on Twitter and LinkedIn for daily insights and tech updates. Together, let's harness the power of DevOps to build, automate, and innovate our way to success! πŸš€ #DevOps #AWS #TechEnthusiast #InnovationJourney #90DaysOfDevOps