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.
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.
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.
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.
Applications: This is the topmost layer of the Linux architecture and consists of the various applications that run on the operating system.
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
Options | Description | |
ls -a | list all files including hidden file starting with '.'. | |
ls -d | list directories - with ' */'. | |
ls -l | list with long format - show permissions. | |
ls -F | Append indicator (one of */=>@ | ) to entries. |
ls -lh | This command will show you the file sizes in human readable format. | |
ls -r | list in reverse order. | |
ls -i | list file's inode(index) number. | |
ls -ltr | View Reverse Output Order by Date. | |
ls -t | sort by time & date. | |
ls -n | It is used to print group ID and owner ID instead of their names. | |
ls -m | A list of entries separated by commas should fill the width. | |
ls -g | This allows you to exclude the owner and group information columns. | |
ls -q | Force printing of non-graphic characters in file names as the character `?';. | |
ls -Q | Place 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