Table of contents
Introduction:
Welcome back to Day 2 of our #90daysdevops journey! Today, we're immersing ourselves in the world of Linux—a versatile and powerful operating system widely embraced in the DevOps landscape. Let's start with the fundamentals and gradually unveil the essentials for mastering Linux in your DevOps toolkit.
What is Linux?
Linux, the Open-Source Pioneer: Linux is a Unix-like operating system kernel that serves as the foundation for various open-source operating systems. What sets Linux apart is its open-source nature, allowing users to view, modify, and distribute the source code freely. This collaborative approach fosters innovation and has led to the creation of numerous Linux distributions (distros), each catering to specific needs.
Multi-User, Multi-Tasking Powerhouse: Linux excels in supporting multiple users concurrently, with each user having a personalized environment. Its robust multi-tasking capabilities make it a preferred choice for servers, where simultaneous processes are the norm.
Linux Basics:
Command-Line Interface (CLI) Brilliance: While Linux does offer a graphical user interface (GUI), the heart of its power lies in the command-line interface (CLI). The CLI grants users unparalleled control and efficiency, making it a preferred environment for developers and system administrators.
Essential Commands:
Present Working Directory (
pwd
):Displays the current working directory, revealing your position in the file system hierarchy.
pwd
List Files and Directories (
ls
):Provides a snapshot of the contents in the current directory, including hidden files with the
-a
flag.ls
ls -a
Change Directory (
cd
):Navigates to a specified directory, facilitating seamless movement within the file system.
cd <directory_name>
To make Directory (
mkdir
):The
mkdir
command in Linux is used to create directories (folders).mkdir <directory_name>
To make file (
touch
):To create a file in Linux, you can use the
touch
command. Thetouch
command is used to create an empty file or update the access and modification timestamps of an existing file. Here's a brief overview of how to use thetouch
command.touch <file_name>
Create Nested Directories (
mkdir -p A/B/C/D/E
):Establishes a nested directory structure, enhancing file organization.
mkdir -p <directory_name>/<sub-directory_name>/<file_name>
Display the username(
whoami
):The
whoami
command in Linux is used to print the username of the current user.whoami
To delete files(
rm
):The
rm
command in Linux is used to remove or delete files or directories.rm <file_name>
Linux Properties:
1. Robust Security Measures:
- Linux is renowned for its robust security features, including user permissions, firewalls, and regular security updates.
2. Unmatched Stability:
- Linux systems are known for their stability and reliability, capable of running for extended periods without requiring a reboot—ideal for server environments.
3. Flexibility and Customization:
- Linux empowers users with extensive customization options, from the desktop environment to system configurations, tailoring the OS to individual preferences.
Conclusion:
Day 2 has provided an introduction to Linux, delving into its core principles and essential commands. As we progress in this #90daysdevops journey, we'll continue unraveling the layers of Linux, exploring advanced commands, and leveraging its unique features for seamless DevOps practices. Stay tuned for more discoveries ahead! 🚀🐧