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:
- 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.
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 .
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
- 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.
- 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.
- 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
2 . mkdir
command -
mkdir
command help to create directory and subdirectory.
3 . cd
command - cd
command used to change directory. We use this command to change directory.
4 . open
command -open
command open current directory
5 . ls -a
command - This is command show us all the hidden files . Hidden file started with .
6 . cat
command - cat
command show us what is inside the file
7 . echo
command - echo
command is used to display text
8 . pwd
command - pwd
command print working directory
9 . cat > myfile
command -
This cammand create command create myfile also from next line we can type content of myfile in terminal
10 . man
command - man
command use to get information about any particular command
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
12 . touch
command - touch
command use to create file in current directory
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
14 . mv
command - mv
command use to move file into another folder in same level means folder should be present in same directory
We also use mv
to rename file
15 . rm
command - rm
command use to delete permanently file from directory
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
16 .df
command - df
command displays the amount of disk space available on the filesystem with each file name's argument.
17 . find
command - find
command display all the file that is present in current directory
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
19 . history
command - This command use to display list of command that we used in terminal session
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