Beyond Basics: Exploring Fundamental Concepts of Linux Administration Techniques
Tags: 120daysofdevops, linuxcli, linuxconfiguration
Published: 2023-06-14 12:41:05

Welcome to Day 3 of my DevOps Journey! As part of my 120-day journey into the world of DevOps, I dedicated my third day to delve into the essential concepts of Linux administration. This post aims to explain my understanding of some Linux concepts, exploring crucial aspects like the Linux command line interface (CLI), the operating system itself, and the mysterious workings of the Linux kernel. Join me as we unravel the intricacies of Linux administration and expand our knowledge in this fundamental domain.

## Introduction
Linux, an open-source operating system, has become a cornerstone in the tech industry due to its flexibility, stability, and security. Understanding the Linux Command Line Interface (CLI) is essential for effective system administration and development tasks.

## Understanding the Linux Command Line Interface (CLI)
The Linux CLI serves as a gateway to the underlying operating system, allowing users to interact with the system through a text-based interface. While modern graphical user interfaces (GUIs) have made computing more accessible, the CLI remains an indispensable tool for system administrators, developers, and power users. It offers unparalleled control, efficiency, and the ability to automate complex tasks with ease.

System administrators rely heavily on the CLI to manage and configure Linux systems. It provides granular control over various aspects of the operating system, including file management, user administration, network configuration, and service management. With the CLI, administrators can efficiently navigate the file system, modify system settings, monitor system performance, and troubleshoot issues.

For developers, the CLI is an essential tool in their workflow. It enables them to compile code, manage version control systems, run scripts, and interact with development tools and frameworks. Many development environments and tools provide a command-line interface, empowering developers to automate build processes, run tests, and deploy applications seamlessly.

### Essential CLI Commands for Linux
**A. Navigation and File Management**

- pwd: Print the current working directory.

```
pwd
```
**Output:** 
`/home/user/Documents
`

- ls: List files and directories in the current location.

```
ls
```
**Output:**
`file1.txt  file2.txt  directory1  directory2
`

- cd: Change the current directory.

```
cd <directory name>
```
**Output:** (No output is displayed after a successful cd command is typed but you will notice a change in the paths e.g `uwabor/users/directory1~$`)

- mkdir: Create a new directory.

```
$ mkdir new_directory

```
**Output:**(No output is displayed after a successful `mkdir` command but you will notice a new directory was created when you you the ls command)

- rm: Remove files and directories.

```
$ rm file1.txt
```
**Output: **(No output is displayed after a successful `rm` command but you will noticed the file or directory you intend to remove won't be seen anymore when you use the ls command)

**B. File Operations**
1. cp: Copy files and directories

```
$ cp file1.txt file2.txt

```
Output: 
(No output is displayed after a successful `cp `command but you can see the copied file when you navigate to it)

2. mv: Move or rename files and directories

```
$ mv file1.txt new_directory/

```
Output: (No output is displayed after a successful `mv `command)

3. touch: Create empty files

```
$ touch new_file.txt

```
Output: (No output is displayed after a successful `touch` command)

4. cat: Display file contents

```
$ cat file1.txt

```
Output:
`This is the content of file1.txt.`

5. grep: Search text within files

```
$ grep "keyword" file1.txt

```
Output:
`This line contains the keyword.`


**C. System Information and Processes**

uname: Print system information.
```
$ uname -a

```
Output:
`Linux mypc 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 GNU/Linux`

top: Monitor system processes and resource usage.

```
$ top

```
Output: 
(Displays a live view of system processes and their resource usage)

ps: List running processes.

```
$ ps aux

```
Output:
`USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2 195376 10188 ?        Ss   Jan01   0:01 /sbin/init
...`

kill: Terminate processes.

```
$ kill 1234

```
Output:
 (No output is displayed after a successful `kill` command)

In conclusion, mastering the Linux Command Line Interface (CLI) is a pivotal step towards becoming proficient in managing and developing on Linux systems. The commands discussed in this guide serve as a solid foundation for navigating the CLI and performing essential operations. However, the journey doesn't end here. To truly harness the power of the Linux CLI, it is crucial for me to continue exploring and practicing these commands down to the more advanced concepts.

By dedicating my time and effort to further expand this Linux knowledge, I can unlock a multitude of possibilities within the CLI. I will delve into advanced commands, leverage scripting capabilities, and automate repetitive tasks to enhance their productivity and efficiency. With practice, I will develop the intuition and fluency to manoeuvre through the CLI with ease, empowering them to tackle complex system administration and development tasks.

In summary, the journey to mastering the Linux CLI is a continuous process of exploration, practice, and growth. I will Embrace the command line, persevere in learning, and soon you I become adept at utilizing the vast capabilities of the Linux CLI. With this valuable skillset in hand, I will unlock new levels of efficiency and effectiveness in managing and developing on Linux systems.
As I journey through DevOps.

### Resources

- [Learn Linux in 5 days.](https://github.com/PacktPublishing/-Learn-Linux-in-5-Days-and-Level-Up-Your-Career-v-/blob/master/CODES/Learn%20Linux%20in%205%20Days%20Course%20Slides%20%26%20Supplements/slides/008-Basic-Linux-Commands.pdf)

- [Learn Linux in one day.](chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.guru99.com/pdf/linux_preview.pdf
)
- [Linux command Basics ](https://www.slideshare.net/mkmannu/linux-commands-38450999)