#Day2:- 90 Days DevOps Challenge @ Linux Fundamentals
Building a Strong Foundation: Linux Fundamentals for DevOps Engineers
🐧What is Linux?
Linux is a free and open-source operating system that powers a wide range of devices and computers. It is known for its stability, security, and flexibility. Think of it as the software that runs your device, helping you interact with applications and hardware. Linux provides a solid foundation for servers, smartphones, IoT devices, and even everyday computers. It offers customization options and uses a command-line interface for control and automation. With a large community of developers and constant updates, Linux ensures a reliable and versatile operating system experience for users. Some popular flavors include Ubuntu 🌌, Fedora 🕊️, Debian 🎣, and Linux Mint 🍃.
In 1991, Linus Torvalds developed the Linux OS that helped improve the UNIX OS. When he suggested these improvements to UNIX designers, he was rejected by them and thus thought of launching his own OS. An OS that could be modified by its users.
💻Why Linux Is Better Than Windows?
🐧🐧🕸️Linux, an open-source operating system, stands out for its stability, security, and flexibility, allowing for a highly customizable and secure computing experience. In contrast, Windows provides a user-friendly interface and broad software compatibility but is often associated with higher vulnerability to viruses and malware.
🧑💻Components of Linux System:-
🗣️There are three components in a Linux OS:
Kernel: 💽It is the core of Linux and is responsible for all the major activities happening in this OS as it interacts with the underlying hardware directly. There are multiple modules in a kernel. IT helps hide low level hardware details from the system or application programs by providing the required abstraction to these hardware.
System Library: It helps access Kernel’s features and implement most of the functionalities of the OS. The special functions and programs in the system library do not require the code access rights of the kernel module.
System Utility: These programs perform specialized, individual level tasks.
🏢Architecture Of Linux:-
🗣️A Linux System has the following layers:
Hardware: This includes peripheral devices like RAM, HDD, and CPU.
Kernel: Interacts with the hardware directly and provides low-level services to upper-layer components.
Shell: This hides the complexity of the functions of a kernel and acts as an interface to it. It takes commands from users and executes kernel functions.
Applications/Utilities: Utility programs provide the user with OS functionalities.
🦾Benefits of Linux:
It can be modified by anyone who has programming knowledge📳.
Beginners can learn it easily.
You can choose from millions of programs, applications and Linux software, most of which are free!
With Linux, the system doesn’t need an antivirus. It is a highly secure system with a global development community that constantly upgrades its security. This makes the OS more secure and robust
It is a great choice for server environments as it is stable and reliable. Linux-based servers can run non-stop and they won’t need a reboot for years.
It is flexible and can be run on any system💪.
💻 Basic Commands Of Linux:
List files and directories: Command:
ls
Result: 📁📄 (Displays a list of files and directories in the current location)Change directory: Command:
cd directory_name
Result: 📂 (Navigates to the specified directory)Create a new directory: Command:
mkdir directory_name
Result: 📁 (Creates a new directory with the given name)Remove a file: Command:
rm file_name
Result: 🗑️ (Deletes the specified file)Copy a file: Command:
cp source_file destination
Result: 📋📂 (Copies the source file to the specified destination)Move or rename a file: Command:
mv source_file destination
Result: 🚚 (Moves or renames the source file to the specified destination)Display file content: Command:
cat file_name
Result: 📄 (Displays the content of the specified file)Search for a specific string in a file: Command:
grep "search_string" file_name
Result: 🔍📄 (Finds and displays lines containing the search string in the specified file)View the manual for a command: Command:
man command_name
Result: 📚 (Displays the manual page with detailed information about the specified command)Clear the terminal screen: Command:
clear
Result: 🧹 (Clears the terminal screen, providing a clean slate)
/🕸️💻Adding Website To Explore More Linux commands:-
✨✨https://www.digitalocean.com/community/tutorials/linux-commands
✨🧨Simple Task:
- Check Your Present Working Directory: To check your present working directory, where you are currently located in the file system, we'll use the
pwd
command. It's like asking Linux, "Where am I right now?" 🗺️
🌟 Command: pwd
🌟 Output: /home/user
- List All Files and Directories, Including Hidden Ones: To list all files and directories, including those hidden from plain sight, we'll use the
ls
command with the-a
flag. It's like shining a light on all the nooks and crannies of your current directory. 📜👀
🌟 Command: ls -la
🌟 Output:
- Create a Nested/Parent Directory: Now, let's venture into creating a nested directory structure. With the
mkdir
command and the-p
flag, we can create the nested directories A/B/C/D/E in a single stroke. Think of it as constructing a series of nested boxes, one inside the other. 📁🎁
🌟 Command: mkdir -p A/B/C/D/E
🌟 Output: (No output means success! The nested directory structure A/B/C/D/E has been created.)
Understanding these concepts and commands empowers you to work efficiently and explore the vast possibilities of the Linux operating system. 🚀🐧
📖💥Summary:
Linux is a well-known version of the UNIX OS. The Linux OS is portable and multi-user. It is an open-source OS that provides multiprogramming and security. It also has a shell and a hierarchical file system. There are four layers in the architecture of Linux, namely, hardware, Kernel, Shell, utilities.
🙏🙏🫂Thank you for taking the time to read my blog on Linux! I hope you found it informative and helpful in understanding the power and versatility of this open-source operating system. Feel free to explore more of my content, and don't hesitate to reach out if you have any questions or need further assistance. Happy Linux adventures! 🐧✨