Day2, 90 Days Of Devops Challenge

·

3 min read

Task: Basic linux command

Introduction to Linux

- Linux is an open-source operating system (OS). It was released first time by Linus Torvalds in 1991.

-Linux was originally developed for personal computers based on the Intel x86 architecture but has since been ported to more platforms than any other operating system.

- Linux is a kernel and not an operating system and GNU is a collection of free software, these two project collabs give us "Linux" or the “GNU/Linux” operating system. Some companies and open source communities adopt GNU/Linux codebase, did some modifications, and created their version or distributions.

ex. RHEL,CentOS,Ubuntu,kali Linux

Architecture of Linux

Introduction to Linux Operating System - GeeksforGeeks

  1. Kernel:

    - The kernel is one of the fundamental parts of an operating system. It is responsible for each of the primary duties of the Linux OS.

    - Each of the major procedures of Linux is coordinated with hardware directly.

    - It is the main layer between the OS and underlying computer hardware, and it helps with tasks such as process and memory management, file systems, device control and networking.

    - The kernel is in charge of creating an appropriate abstraction for concealing trivial hardware or application strategies.

    - Different types of the kernel are:

    • Monolithic Kernel

    • Hybrid kernels

    • Exo kernels

    • Microkernels

  2. System Library:

    It is a special type of function that is used to implement the functionality of the operating system.

  3. Shell:

    It is an interface to the kernel which hides the complexity of the kernel’s functions from the users. It takes commands from the user and executes the kernel’s functions.

  4. Hardware Layer:

    This layer consists of all peripheral devices like RAM/ HDD/ CPU etc.

  5. System Utility:

    It provides the functionalities of an operating system to the user.

Linux Basic commands:

pwd #It shows the present working directory.

ls #It shows available files and directories listed in the present working directory.

uname #It shows the name of Kernel(OS).

uname -r # It shows the version of kernel.

cd #To change the directory.

clear #To clear the screen.

whoami #It shows current login user name.

history #It shows a list of previously used commands.

date #It shows the date and time.

#Create directory:

mkdir # To create directory .

#Ex. : mkdir test - create test directory.

mkdir # To create multiple directory .

mkdir -p///.... #To create directory path.

mkdir /{1..10} #To create multiple directory within a range.

#Create file:

touch # create a file.

touch # To create multiple files.

touch /{1..10} # To create multiple files within a range.

#Copy file:

cp # copy a file

#option :

#-r for recursive #-v for verbose #-r for forcefully

cp -rvf/root/D* / home #copy all files starting with D.

#Move or rename file & directory:

mv # move a file or group of files to another directory. mv # rename file or directory.

#Remove file : rm # removes file useradd #create a user account:

passwd #create a user account password

userdel #delete user account su (switch user) #switch user

Thank you, Readers, for giving your precious time to read my first-ever blog. I am open to your valuable suggestions to upskill myself.