linux_codeit
linux_codeit
Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of
the most popular platforms on the planet,
Android, is powered by the Linux operating system. An operating system is software
that manages all of the hardware resources
associated with your desktop or laptop. To put it simply, the operating system
manages the communication between your software and your hardware.
Without the operating system (OS), the software wouldn’t function.
We need to understand this something like C drive contains OS related info, D drive
contains user related info etc.
/root
within root directory many sub-directories will be installed automatically, lets
discuss few which are more imp.
Filesystems
/etc - It Contains all the system Configuration file info - ex: u1 rename u3 then
deleted user everything gets updated in one of the file for user ref.
/usr - Contains all the Manpage information - This is the help page info like F1 in
windows, ex: #man usermod - describes the entire info about the command.
/var - System log info - diagnostic messages to diagnise the problem and find the
solution.
/opt - Contains all the the 3rd party packages installations info
/mnt - If there are any file systems mounted that stores here
/sbin - Contains all admin commands info
/bin - Contains all the normal user info
/tmp - Contains all the temporary files info - while running the application many
temporary files will be generated by the OS.
/home - It is the user default directory - ex: if we create the user its going to
create in home path, if we modify path while creating then creates in diff dir.
/proc - contains all the active PID's
/lib - Contains all library files
/media - Contains all removable devices info
*****************************************************************************
Types of shell
/sbin/sh - Bourne shell
/sbin/sch - C shell
/bin/bash - Default shell (Bourne again shell / Alive shell)
/bin/zsh - Z shell
/bin/ksh - k shell
***********************************************************************************
***************
Umask - Usermask Value
Purpose is to provide the security to files and directories.
R- 4
W- 2
X- 1
*********
RWX- 7
2) Symbollic method
Owner permission - u
Group Permission- g
Other permission - o
**********************************************************************************
Links
1) Hardlink
# ln <SFN> <DFN>
* The files that are having same inode number
* Its difficult to identify the hardlink
* They are applicable only for the files within the filesystem
* Whatever we update on source file it gets updated in destination file also and
vice-versa.
* Though if we delete source file we can access destination file easily because of
same inode number, these acts as backup.
* If we delete the detination file only link will be broken but source file will be
there.
2) Softlink
# ln -s <SFN> <DFN>
* We can identify the soft links by its permissions and inode number.
* Softlinks are applicable for both files and directories.
* They can be configured across different FS.
***********************************************************************************
***
Process Management
Any task we do in OS is known as process. Each process will be having their own
PID.
Types of Process
1)Zombie Process : The process which is running without parent process
2)Orphan Process : The process which is running with parent process
3)Parent Process : The process starts itself and creates another process
4)Child Process : The process which is created by the parent process
5)Running Process : The process which is in running state
6)Sleeping process : The process which is in sleeping state.
7)Waiting Process : The process which is waiting due to resources issues, virtual
memory space issue, hardware memory issue etc.
8)Stopped Process : The process that had been completed/done with the execution and
had stopped.
***********************************************************************************
**************