#90DaysOfDevops #Day2

Index

🐧What is Linux?

📔What did I learn today?

🤔Solution of questions

What is Linux?

let's look at some history

I know not everyone enjoys history but I have tried to keep it short and simple

Linux is an open-source operating system that was originally developed by Linus Torvalds in 1991. It is based on the Unix operating system and has gained significant popularity over the years.

Interesting facts about Linux:

More than 90% of legacy applications are running on top of Linux os.

  • 🧠 Command-Line Power: Linux is predominantly command-line driven, empowering engineers with powerful tools and utilities to interact with the operating system and execute tasks efficiently.

  • ⚙️ Infrastructure as Code: DevOps engineers heavily rely on configuration management tools like Ansible, Chef, or Puppet, which often run on Linux. Understanding the underlying OS enables seamless automation and configuration management.

  • 🌐 Prevalence in Cloud: Linux dominates the cloud landscape. Popular cloud providers like AWS, Azure, and GCP primarily utilize Linux-based virtual machines. DevOps engineers leverage Linux skills to configure and manage cloud infrastructure effectively.

  • 🔒 Security and Stability: Linux is renowned for its security and stability features. DevOps engineers leverage these attributes to ensure secure infrastructure deployments and reliable services for end users.

  • 🐧 Open-Source Community: Linux thrives on an active and supportive open-source community. DevOps engineers benefit from community-driven tools, forums, and resources that foster collaboration and knowledge-sharing.

  • 🐞 Debugging and Troubleshooting: Proficiency in Linux helps DevOps engineers diagnose and resolve issues promptly. In-depth knowledge of system logs, process management, and troubleshooting techniques ensures efficient incident response and system maintenance.

  • 📚 Continuous Learning: Linux provides a vast learning ecosystem with various distributions and flavors. DevOps engineers gain transferable skills that extend beyond a single platform, fostering continuous learning and professional growth.

What did I learn today?

  • On day 2 I learn about Linux commands which are important.
Indexcommanddescription
1lsto display all directories and files at the current location
2ls -ato display all the directories, and files including hidden ones.
3ls *.txtto display all files having extension as a Txt file
4cdif you type only cd then you will be redirected to the home directory of the user regardless of wherever you are working
5pwdto print down the current working directory
6cd ..to go one directory back
7cd mydir/child_diruse cd and path to go to the specific directory
8mkdir directory_nameto create a new empty directory
9mkdir A B C D Eto create multiple directories ( A,B, C,D, E)
10mkdir {A..D}to create multiple directories with {} wild operators ( it will create A, B, C , and D directories)
11touch filename.txtto create an empty file
12cat filename.txtto see the content of the file
13nano filename.txtto open nano editor to edit file content
14vi filename..txtto open vi editors to edit file content
15rm filename.txtto delete filename.txt
16rmdir Ato delete the directory named A
17rm -r Ato delete all the directories and files inside of it ( recursive delete)
18rm --help--help after any command will show the possible options and its description ( you can also use man rm)
19uname -ato display all the information of your machine ( os , processor, machine, kernel info)
20historyto see past commands which you have used
21cat /etc/passwdto list down all the users who are present.
22useradd newUserto create a new user
23su newUserto switch to that user
24passwd newUserto reset the password of the user incase you forgot ( make sure you have root access for this)
25clearto clear the screen
26sudo apt updateto update the local index of packages.
27sudo apt upgradeto update installed packages in the system which are installed
28sudo apt install wgetto install software use this command
29whoamito see who is present user
30cp source destinationto copy the file to a location you can use the cp command and to cut you can use the mv command

Solution of questions

  1. Check your present working directory

  1. List all the files or directories including hidden files

  1. Create a nested directory A/B/C/D/E