Linux Boot Process.
BIOS/UEFA
MBR ##################Master Boot record
GRUB2 ##################Grand unified boot loader
Kernel ##################
init ##################used in older release whereas systemd is
used in RHEL7 & above
runlevel ################## runlevel 0 will shutdown system ...... 5
for reboot in graphical mode..... 6 is used to reboot the system
Password age
chage -M <days> <user>
For alert to change passwd to user before expiry
chage -W <days> <user>
To view user password policy
chage -l <user>
to Set user account expire
chage -E <yy/mm/dd> <user>
cat /etc/passwd
encrypted password file
cat /etc/shadow
Runlevel
init 6 ############# reboot
init 0 ############# system shutdown
shutdown -r +5 ########### system will reboot in 5 min
shutdown -c ############## cancel system shutdown
shutdown -h 22:00 "<Message>" ############## send msg to user before shutdown
nice ############ Command to modifyl the process priority time
value -20 is higher and 19 means lowest ############ the higher the value the
process time will be increased
ps -eo pid,nice,comm | grep < process name> ########### to vie the process id with
priority
renice -n <value> <process ID> ############## to cahnge the priority of process
Read=r=4 Write=w=2 Execute=x=1
File permission formula
for file subtract the umask of user from 666 ####################### 666-022
636
for directory subtract the umask of user from 666 ################## 777-022
chattr +i <file name> ############# To lock file from deletion
chattr -i <file name> ############# To unlock file from deletion
chkconfig --list ################# to check which service will run on which level
chkconfig --list <Service Name> ################# to check specific service will
run on which level
chkconfig <service name> off ################# to disable service from starting
after reboot
chkconfig <service name> on ################# to enable service from starting after
reboot
chkconfig <service name> --level <runlevel> off ############### to disable specific
service to start in specific run level
chkconfig <service name> --level <runlevel> on ############### to enable specific
service to start in specific run level