Basic concepts of linux

Day 6
Hello everyone welcome back !!!
Myself Swanik Santosh Gudekar and I am back with my blog. This is the sixth blog of Linux series. Today I attended the sixth session conducted by Master Pranav Jambare at Dr. Babasaheb Ambedkar technology.
Points Covered In This Session :
Booting Process
ACL
Processes
Booting process :
Booting is the process of starting the computer.
To start the Computer, load the Operating System into the Main Memory and then Computer is ready to take commands from the User.
Booting a Linux installation involves multiple stages and software components, including firmware initialization, execution of a boot loader, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons.
Stages of booting process is as follows:
1) BIOS :
BIOS stands for (Basic Input/Output System).
In simple terms, the BIOS loads and executes the Master Boot Record (MBR) boot loader.
When you first turn on your computer, the BIOS first performs some integrity checks of the HDD or SSD.
Once the boot loader program is detected, it's then loaded into memory and the BIOS gives control of the system to it.
2) MBR :
MBR stands for Master Boot Record and is responsible for loading and executing the GRUB boot loader.
The MBR contains information about the partition of the hard drive, as well as the boot loader.
MBR is an important process, as it helps the computer to locate the bootloader and the operating system.
3) GRUB :
GRUB (GRand Unified Bootloader) is a boot loader that is commonly used on Linux Systems.
It is responsible for loading the operating system into memory and it presents users with a booting menu, allowing users to choose which operating system they want to use.
GRUB uses a configuration file to define which operating systems are installed and how they should be booted.
Configuration file path of GRUB :
/boot/grub2/grub.conf
4) Kernel :
The kernel is often referred to as the core of any operating system, Linux included. It has complete control over everything in your system.
In this stage of the boot process, the kernel that was selected by GRUB first mounts the root file system that's specified in the grub.conf file.
Then it executes the /sbin/init program, which is always the first program to be executed.
5) init.d / system.d :
init. d is the directory that stores services control scripts, which control the starting and stopping of services such as httpd, sshd, etc.
System.d is a Linux system and service manager that is responsible for controlling the boot process of a Linux system.
The system.d boot process consists of several stages, each of which performs a specific task that is necessary for the successful initialization of the system.
6) Run level :
A runlevel is an operating state on a Unix and Unix-based operating system that is preset on the Linux-based system.
Runlevels are numbered from zero to six. Runlevels determine which programs can execute after the OS boots up.
The runlevel defines the state of the machine after boot.
zero to six level are as follow :
run level 0 -Halt state poweroff . target
run level 1 - Single user mode / rescue . target
run level 2 - Multi user mode without networking
run level 3 - Multi user with networking
run level 4- User definable
run level 5 - GUI grapical . target
run level 6 - Reboot target
ACL :
ACL provide access control to directories and files.
ACLs can set read, write, and execute permissions for the owner, group, and all other system users.
An ACL consists of a set of rules that specify how a specific user or group can access ACL enabled files and directories.
Access control lists are used for controlling permissions to a computer system or computer network. They are used to filter traffic in and out of a specific device.Those devices can be network devices that act as network gateways or endpoint devices that users access directly.
SYNTAX :
setfacl <opytion>:<username>:<permission><directory name>
Processes :
The processes are the events that have been tracked in logs.
Processes are created when a new program is executed.
Each process in Linux is assigned a unique identifier called the Process ID (PID).
When a process completes its execution, it terminates.
States of Processor :

Created : The process is created is waiting to be loaded into the main memory.
Ready : The process is loaded into the main memory and is waiting for CPU time to execute.
Running : The process is currently executing on a CPU core.
Terminated : The process has completed its execution and has been terminated by the operating system.
Types of Processes :
1) Parent process :
A parent process is a process that has created one or more child processes.
A parent process is responsible for managing the child process and also performing activities like sending signals to the child process or retrieving the child process's exit status.
2) child Process :
A child process is a process that is created by another process known as the parent process.
A child process can perform its task independently of the parent process.
3) Orphan process :
The orphan process can occur in Linux when a parent process terminates unexpectedly or fails to properly manage the child process.
If the parent process terminates before the child process, the child process becomes an orphan.
4) Zombie Process :
- Zombie process can occur in Linux when a parent process fails to properly manage its child processes and can consume system resources if not properly terminated.
Process command :
1) Top command :
Top command is used to display the system's current resource usage and the processes that are running on the system.
SYNTAX : top
2) Nice command :
- SYNTAX : nice -n <niceNumber><command>
3) PS command :
Displays a list of the processes that are currently runnung along with pid and other information
SYNTAX : ps -ef|grep top
4) kill command :
- SYNTAX : kill <option><pid>
5) Renice command:
- SYNTAX : renice -n <niceNumber><pid>
6) Teriminate command :
- SYNTAX : kill -15 <pid>
7) Resume command :
- SYNTAX : kill -18 <pid>
8) Suspend command :
- SYNTAX : kill -19 <pid>
9) To check status :
- SYNTAX : jobs
10) Run background process :
- SYNTAX : bg %<jobno>
11) Run foreground process :
- SYNTAX : fg %<jobno>
These were the topics covered by Master Pranav Jambare in the sixth session of Linux. Thankyou for reading my blog !!



