#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.
Index | command | description |
1 | ls | to display all directories and files at the current location |
2 | ls -a | to display all the directories, and files including hidden ones. |
3 | ls *.txt | to display all files having extension as a Txt file |
4 | cd | if you type only cd then you will be redirected to the home directory of the user regardless of wherever you are working |
5 | pwd | to print down the current working directory |
6 | cd .. | to go one directory back |
7 | cd mydir/child_dir | use cd and path to go to the specific directory |
8 | mkdir directory_name | to create a new empty directory |
9 | mkdir A B C D E | to create multiple directories ( A,B, C,D, E) |
10 | mkdir {A..D} | to create multiple directories with {} wild operators ( it will create A, B, C , and D directories) |
11 | touch filename.txt | to create an empty file |
12 | cat filename.txt | to see the content of the file |
13 | nano filename.txt | to open nano editor to edit file content |
14 | vi filename..txt | to open vi editors to edit file content |
15 | rm filename.txt | to delete filename.txt |
16 | rmdir A | to delete the directory named A |
17 | rm -r A | to delete all the directories and files inside of it ( recursive delete) |
18 | rm --help | --help after any command will show the possible options and its description ( you can also use man rm) |
19 | uname -a | to display all the information of your machine ( os , processor, machine, kernel info) |
20 | history | to see past commands which you have used |
21 | cat /etc/passwd | to list down all the users who are present. |
22 | useradd newUser | to create a new user |
23 | su newUser | to switch to that user |
24 | passwd newUser | to reset the password of the user incase you forgot ( make sure you have root access for this) |
25 | clear | to clear the screen |
26 | sudo apt update | to update the local index of packages. |
27 | sudo apt upgrade | to update installed packages in the system which are installed |
28 | sudo apt install wget | to install software use this command |
29 | whoami | to see who is present user |
30 | cp source destination | to copy the file to a location you can use the cp command and to cut you can use the mv command |
Solution of questions
- Check your present working directory
- List all the files or directories including hidden files
- Create a nested directory A/B/C/D/E