DAY-2|DEVOPS JOURNEY:
 Lets learn about Linux OS

DAY-2|DEVOPS JOURNEY: Lets learn about Linux OS

Before we deep dive in devops ocean we will learn why linux is important in your devops journey and we'll go through the linux architecture and what are basic commands which we can use to interact with linux operating system.

LINUX OPERATING SYSTEM:

Linux is free,open source operating system which was developed by Linux Torvalds.
Today linux is one of the most popular secure and robust operating system in the world of computers.

Lets understand the Architecture of Linux OS

The Linux operating system's architecture mainly contains some of the components: the Kernel, System Library, Hardware layer, System, and Shell utility.

  1. Hardware : This is the bottommost layer of the Linux architecture and represents the physical hardware components of the computer, such as the processor, memory, and storage.

  2. Kernel : The kernel is the core of the operating system and is responsible for managing the resources of the computer, such as the CPU, memory, and I/O devices.

  3. Utilities: A set of programs that perform various system-level tasks, such as managing processes, controlling user accounts, and configuring system settings. These utilities are usually command-line programs that are invoked by the user or by other programs.

  4. Applications: This is the topmost layer of the Linux architecture and consists of the various applications that run on the operating system.

  5. Shell : Its an enviornment where we can run commands to interact with OS. Its like user interface for access to an operating system services.

BASIC COMMANDS USED IN LINUX

1) ls command: It is used to list files and subdirectories in the current directory.

Running it without a flag or parameter will show the current working directory’s content.

Some ls command examples with flag:

ls [OPTION]... [FILE]...4

OptionsDescription
ls -alist all files including hidden file starting with '.'.
ls -dlist directories - with ' */'.
ls -llist with long format - show permissions.
ls -FAppend indicator (one of */=>@) to entries.
ls -lhThis command will show you the file sizes in human readable format.
ls -rlist in reverse order.
ls -ilist file's inode(index) number.
ls -ltrView Reverse Output Order by Date.
ls -tsort by time & date.
ls -nIt is used to print group ID and owner ID instead of their names.
ls -mA list of entries separated by commas should fill the width.
ls -gThis allows you to exclude the owner and group information columns.
ls -qForce printing of non-graphic characters in file names as the character `?';.
ls -QPlace double quotations around the entry names

Lets see some Directory Commands:

1) cd- command is used to check the current directory.

nairanub@test:~$ cd /

2) pwd- command is used to print the current working directory.

3) cd - go to the last working directory.

4)cd.. change the directory to one step back

5) cd ../.. change the directories two level back

6) mkdir: command to create directory which we call folders on windows

mkdir Folder 1

mkdir A B C D

mkdir .folder 1

mkdir -p : command will create nested directories.

nairanub@test:~$ mkdir -p /home/nairanub/folder2

6) rmdir -command will remove/delete an existing directory

rmdir folder2

rmdir -p :It will first remove the child directory and then remove the parent directory.

We will more learn about file commands ,user managment commands in the next blod.

Stay Tuned.

#LinuxLearning#devopsjourney#trainwithShubhamcommunity#happylearning.

Linkedin: www.linkedin.com/in/anurag-nair-devops-engineer