Linux System Admin Interview Questions and Answers
Q1. Why LVM is needed ?
Ans: LVM stands for Logical Volume Manager , to resize filesystem’s length on-line we required LVM partition in Linux. Size of LVM partition may be extended and decreased the usage of the lvextend & lvreduce instructions respectively.
Q2. How To test Memory stats and CPU stats ?
Ans: Using ‘unfastened’ & ‘vmstat’ command we are able to show the physical and digital reminiscence records respectively.With the help of ‘sar’ command we see the CPU utilization & one-of-a-kind stats.
Q3. What does Sar provides and at which vicinity Sar logs are stored ?
Ans: Sar Collect, file, or shop device interest facts. The default version of the sar command (CPU usage file) is probably one of the first centers the customer runs to begin system interest research, because it monitors primary device assets. If CPU utilization is close to one hundred percent (client + fine + machine), the workload sampled is CPU-sure.
By default log documents of Sar command is placed at /var/log/sa/sadd file, in which the dd parameter suggests the modern-day day.
Q4. How to boom the size of LVM partition ?
Ans: Below are the Logical Steps :
– Use the lvextend command (lvextend -L +100M /dev/<Name of the LVM Partition> , in this case we're extending the scale via 100MB.
– resize2fs /dev/<Name of the LVM Partition>
– test the dimensions of partition the usage of ‘df -h’ command
Q5. How to lessen or shrink the size of LVM partition ?
Ans: Below are the logical Steps to lessen length of LVM partition :
-Umount the filesystem the usage of umount command,
-use resize2fs command , e.G resiz2fs /dev/mapper/myvg-mylv 10G
-Now use the lvreduce command , e.G lvreduce -L 10G /dev/mapper/myvg-mylv
Above Command will cut lower back the dimensions & will make the filesystem length 10GB.
Q6. How to create partition from the uncooked disk ?
Ans: Using fdisk software we will create partitions from the raw disk.Below are the steps to create partition from the uncooked dsik :
– fdisk /dev/hd* (IDE) or /dev/sd* (SCSI)
– Type n to create a trendy partition
– After developing partition , type w command to write down the modifications to the partition table.
Q7. Where the kernel modules are positioned ?
Ans: The ‘/lib/modules/kernel-model/’ listing stores all kernel modules or compiled drivers in Linux working gadget. Also with ‘lsmod’ command we will see all the installed kernel modules.
Q8. What is umask ?
Ans: umask stands for ‘User document advent masks’, which determines the settings of a masks that controls which record permissions are set for files and directories whilst they are created.
Q9. How to set the umask completely for a user?
Ans: To set this price completely for a user, it needs to be established the precise profile file which depends on the default shell of the individual.
Q10. How to change the default run degree in linux ?
Ans: To exchange the run degree we have to edit the document “/and so forth/inittab” and trade initdefault get admission to ( identification:five:initdefault:). Using ‘init’ command we exchange the run degree transient like ‘init 3’ , this command will flow into the tool in runlevl 3.
Q11. How to percentage a directory the use of nfs ?
Ans: To percentage a listing the usage of nfs , first edit the configuration record ‘/and so forth/exportfs’ , add a get entry to like
‘/<directory-name> <ip or Network>(Options)’ after which restart the nfs provider.
Q12. How to test and mount nfs proportion ?
Ans: Using ‘showmount’ command we will see what directories are shared through nfs e.G ‘showmount -e <ip address of nfs server>’.Using mount command we're able to mount the nfs percent on linux gadget.
Q13. What are the default ports used for SMTP,DNS,FTP,DHCP,SSH and squid ?
Ans: Service Port
DNS fifty three
FTP 20 (information transfer) , 21 ( Connection mounted)
DHCP 67/UDP(dhcp server) , 68/UDP(dhcp consumer)
Q14. What is Network Bonding ?
Ans: Network bonding is the aggregation of a couple of Lan cards into a unmarried bonded interface to provide fault tolerance and high overall performance. Network bonding is also called NIC Teaming.
Q15. What are the extremely good modes of Network bonding in Linux ?
Ans: Below are listing of modes utilized in Network Bonding :
balance-rr or 0 – round-robin mode for fault tolerance and cargo balancing.
Lively-backup or 1 – Sets lively-backup mode for fault tolerance.
Balance-xor or 2 – Sets an XOR (specific-or) mode for fault tolerance and load balancing.
Broadcast or 3 – Sets a printed mode for fault tolerance. All transmissions are sent on all slave interfaces.
802.3ad or 4 – Sets an IEEE 802.3ad dynamic link aggregation mode. Creates aggregation corporations that percentage the equal velocity & duplex settings.
Balance-tlb or 5 – Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.
Stability-alb or 6 – Sets an Active Load Balancing (ALB) mode for fault tolerance & load balancing.
Q16. How to check and confirm the popularity the bond interface.
Ans: Using the command ‘cat /proc/internet/bonding/bond0’ , we are capable to check which mode is enabled and what lan playing cards are used in this bond. In this situation we've got one best one bond interface however we're capable of have a couple of bond interface like bond1,bond2 and so on.
Q17. How to test default direction and routing table ?
Ans: Using the Commands ‘netstat -nr’ and ‘route -n’ we are able to see the default course and routing tables.
Q18. How to test which ports are listening in my Linux Server ?
Ans: Use the Command ‘netstat –listen’ and ‘lsof -i’
Q19. List the offerings which might be enabled at a specific run diploma in linux server ?
Ans: With the help of command ‘chkconfig –list grep five:on’ we are able to listing all of the company which can be enabled in run level5. For distinct run degrees really replace 5 with the respective run diploma.
Q20. How to allow a provider at a specific run degree ?
Ans: We can allow a provider the use of the Command ‘chkconfig <Service-Name> on –stage 3
Q21. How to improve Kernel in Linux ?
Ans: We should in no way enhance Linux Kernel , always deploy the contemporary New kernel using rpm command because upgrading a kenel could make your linux field in a unbootable nation.
Q22. How To experiment newly asssigned luns on linux field with out rebooting ?
Ans: There are two procedures to check newly assigned luns :
Method:1 if sg3 rpm is mounted , then run the command ‘rescan-scsi-bus.Sh’
Method:2 Run the Command , echo ” – – – ” > /sys/beauty/scsi_host/hostX/test
Q23. How to discover WWN numbers of HBA playing cards in Linux Server ?
Ans: We can discover the WWN numbers of HBA gambling playing cards the usage of grep port_name’
Q24. How to characteristic & exchange the Kernel parameters ?
Ans: To Set the kernel parameters in linux , first edit the file ‘/and many others/sysctl.Conf’ after making the changes keep the file and run the command ‘sysctl -p’ , this command will make the changes permanently with out rebooting the machine.
Q25. What is Puppet Server ?
Ans: Puppet is an open-deliver & business company software software for configuration manage toll in UNIX like jogging system. Puppet is a IT automation software program used to push configuration to its customers (puppet shops) the use of code. Puppet code can do a diffusion of responsibilities from putting in new software program software, to test record permissions, or updating consumer debts & plenty of different obligations.
Q26. What are manifests in Puppet ?
Ans: Manifests in Puppet are the files in which the patron configuration is particular.
Q27. Which Command is used to signal asked certificates in Puppet Server ?
Ans: ‘puppetca –signal hostname-of-agent’ in (2.X) & ‘puppet ca sign hostname-of-agent’ in (3.X)
Q28. At which region Puppet Master Stores Certificates ?
Q29. How to locate all of the everyday files in a listing ?
Ans: the use of the command ‘find out /<directory -kind f’.
Q30. What is load commonplace in a linux ?
Ans: Load Average is described because the common sum of the variety of method ready inside the run queue and range of method currently executing over the period of one,five and 15 minutes. Using the ‘pinnacle’ and ‘uptime’ command we find out the weight common of a linux sever.