Introduction to Linux and important Linux commands that you should know

ยท

5 min read

Introduction to Linux and important Linux commands that you should know

What is Linux ?

Linux is open source operating System(OS). An operating system is the software that directly manages a system's hardware and resources, like CPU, memory, and storage. OS sits between applications and hardware and makes the connections between all of your software and the physical resources that do the work

The Linux operating system comprises several different pieces:

  1. Bootloader - A boot loader is a program. Whenever a computing system is initially powered on, the first piece of code to be loaded and run is the boot loader.Data of an operating system must be loaded into the working memory during device start-up. This is made possible by a so-called bootloader, also known as a boot program or bootstrap loader .It provides an interface for the user to load an operating system and applications.
  2. Kernel -A Kernel is a computer program that is the heart and core of an Operating System . It is the most important part of an Operating System. Whenever a system starts, the Kernel is the first program that is loaded after the bootloader because the Kernel has to handle the rest of the thing of the system for the Operating System. The Kernel remains in the memory until the Operating System is shut-down . It has four job Memory management ,Process management ,Device drivers and System calls and security .

  3. Init system - It is the init system that manages the boot process, once the initial booting is handed over from the bootloader . Init system is the first process started after the kernel starts. In fact, the init system always gets the Process ID (PID) of 1 on a system. This process is always executed by the Linux kernel after the early stages of bootup are completed by the BIOS and bootloader

  4. Daemon - A daemon is a kind of program over UNIX-like OS that executes in the background unobtrusively, instead of upon the direct access of a user.
  5. Graphical server โ€“ This is the sub-system that displays the graphics on your monitor. It is commonly referred to as the X server or just X.
  6. Desktop environment - User actually interact with this Desktop environment . There're many Desktop environment . Each desktop environment includes built-in applications (such as file managers, configuration tools, web browsers, and games) .

Important Linux command

1 . ls command - ls command show us all the files and folder that's present in current directories.But It won't show hidden files

Screenshot from 2022-08-30 15-17-49.png

2 . mkdir command - mkdir command help to create directory and subdirectory.

image.png

3 . cd command - cd command used to change directory. We use this command to change directory.

image.png 4 . open command -open command open current directory

image.png 5 . ls -a command - This is command show us all the hidden files . Hidden file started with .

Screenshot from 2022-08-30 15-53-08.png

6 . cat command - cat command show us what is inside the file

Screenshot from 2022-08-30 15-57-08.png 7 . echo command - echo command is used to display text Screenshot from 2022-08-30 16-01-36.png 8 . pwd command - pwd command print working directory

Screenshot from 2022-08-30 16-03-59.png 9 . cat > myfile command - This cammand create command create myfile also from next line we can type content of myfile in terminal Screenshot from 2022-08-30 16-10-44.png 10 . man command - man command use to get information about any particular command

image.png

Screenshot from 2022-08-30 16-44-37.png 11 . tr command - tr command use for translating characters . It transfrom uppercase to lowercase, squeezing repeating characters, deleting specific characters and basic find and replace . tr stands for translate

In this image output of the first command is input for the second command then redirect the output to new file upper.txt Screenshot from 2022-08-30 23-51-19.png 12 . touch command - touch command use to create file in current directory

image.png

13 . cp command - We use cp command to copy file . If we use copy command then content that is present in one file will copy in another file

image.png 14 . mv command - mv command use to move file into another folder in same level means folder should be present in same directory image.png We also use mv to rename file Screenshot from 2022-08-31 00-34-49.png 15 . rm command - rm command use to delete permanently file from directory

Screenshot from 2022-08-31 00-36-48.png For removing folder we can use it too by rm -R random but sometime won't work so use rm -rf random if mean we're removing it forcefully

image.png 16 .df command - df command displays the amount of disk space available on the filesystem with each file name's argument.

image.png 17 . find command - find command display all the file that is present in current directory Screenshot from 2022-08-31 01-37-01.png find random display all the file present in random directory 18 . grep command - grep command use to find text or string in any file . If word found then it print that word

Screenshot from 2022-08-31 11-03-22.png 19 . history command - This command use to display list of command that we used in terminal session

image.png 20 . top and kill command : top command use to show all process that are currently and kill command use to kill process . When we used top command command we'll get process id of various process we use that id to kill process

21 . zip command - zip command use to archiving and compressing files

Screenshot from 2022-08-31 12-12-15.png

Did you find this article valuable?

Support Anshu Pathak by becoming a sponsor. Any amount is appreciated!

ย