- When a Linux machine is powered on BIOS loads up first. It will prompt you to select boot device which can be Hard disk, CD-ROM, Floppy drive, Network etc. By default generally it will boot with hard disk
- Next comes your MBR. This will load and execute the GRUB boot loader menu. GRUB stands for Grand Unified Boot Loader. This will display the a splash screen with the contents of /boot/grub/grub.conf
- List of available and installed kernels will be shown, if not selected default kernel will be loaded
- Kernel: Mounts the root files system as specified by "root=" parameter inside /boot/grub/grub.conf file
- Next it will execute /sbin/init program which will boot the linux machine in the default run level as specified by /etc/inittab
- Runlevel: All the scripts loaded inside the selected runlevel from step 5 will be executed These scripts are placed inside /etc/rc.d/rcx.d/. Here x is the runlevel value which will be varying from 0-6
- Scripts starting from S would load at startup and those starting with K would kill the process at shutdown. These incident will take place as per the numerical value assigned to them. For eg: s13network will load prior than s15 sendmail
- Next your login screen will come up
Step by Step Linux Boot Process Explained In Detail
How many commands do you know which can be used to view the contents of any file?
- vi or vim
What is the difference between soft link and hard link?
- Using this only a link to the original file is created (shortcut).
- The size of created shortcut is null.
- If you delete the file then the created link (shortcut) won't work.
- In case you delete the shortcut link then it won't affect the original file
- Another copy of the file is created.
- Both the file have same inode no.
- Any changes made in either of the file will appear on the other file.
- Deleting any of the one file won't affect the other file.
# uname -m
# uname -m
If you get i386, i586 and i686 in your reply than that signifies your machine is 32-bit but if you get x86_64 or ia64 then your machine will be 64-bit.
# getconf LONG_BITHere you will get an output of bit size either 32 or 64.
# getconf LONG_BIT
How can you add a banner or login message in Linux?
By editing these two files
For more details follow below link
Add a Banner to your Linux machine
How will you check the release version of your Linux machine?
# cat /etc/redhat-release
What is the difference between normal kernel and kernel-PAE?
kernel in 32 bit machine supports max of 4 GB RAM whereas
Tell me the command to find all the commands in your linux machine having only 2 words like ls, cp, cd etc.
# find /bin /sbin/usr/bin /usr/sbin -name ?? -type f
Which file is generally used to configure kickstart?
What is the command use to compress a dir using gzip compression?
# tar -czvf myfil.tar.gzip orig_file
What is the command use to compress a dir using bzip2 compression?
# tar -cjvf myfil.tar.bzip2 orig_file
Which log file will you check for all authentication related messages?
What is the command to create multiple directories using one command?
Using -p argument along with mkdir command
Which command would you prefer to monitor your system performance and why?
I personally prefer top and sar command to view the performance related factors of my Linux machine.
The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.
Also sar gives us a standard o/p of the running activity performance related factors in relation to paging, NIC, CPU, Memory etc
For more information on top and sar command follow the below links
What is the command used to find the process responsible for a particular running file?
# fuser filename
# lsof filename
What is the command to take remote of any Linux machine?
What are the three values shown in load average section of top command?
It shows the current, 5 min back and 15 min back load average value
How to check all the process running by a particular user?
# ps -u username
What is an orphan process?
An orphan process is a process that is still executing, but whose parent has died.
What is a defunct process?
These are also termed as zombie process. These are those process who have completed their execution but still has an entry in the process table. When a process ends, all of the memory and resources associated with it are de-allocated so they can be used by other processes.After the zombie is removed, its process identifier (PID) and entry in the process table can then be reused.
Zombies can be identified in the output from the Unix ps command by the presence of a "Z" in the "STAT" column
What is the command in sar to monitor NIC devices received/transmitted packets?
# sar -n DEV 1 5
To learn more about SAR command follow the below link
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux