Linux System Admin Interview Questions with Answers
Question: 1. Why LVM is needed ?
Answer: 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.
Question: 2. How To test Memory stats and CPU stats ?
Answer: 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.
Question: 3. What does Sar provides and at which vicinity Sar logs are stored ?
Answer: 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.
Question: 4. How to boom the size of LVM partition ?
Answer: Below are the Logical Steps :
– Use the lvextend command (lvextend -L +100M /dev/
– resize2fs /dev/
– test the dimensions of partition the usage of ‘df -h’ command
Question: 5. How to lessen or shrink the size of LVM partition ?
Answer: 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.
Question: 6. How to create partition from the uncooked disk ?
Answer: 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.
Question: 7. Where the kernel modules are positioned ?
Answer: 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.
Question: 8. What is umask ?
Answer: 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.
Question: 9. How to set the umask completely for a user?
Answer: 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.
Question: 10. How to change the default run degree in linux ?
Answer: 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.
Question: 11. How to percentage a directory the use of nfs ?
Answer: To percentage a listing the usage of nfs , first edit the configuration record ‘/and so forth/exportfs’ , add a get entry to like
‘/
Question: 12. How to test and mount nfs proportion ?
Answer: Using ‘showmount’ command we will see what directories are shared through nfs e.G ‘showmount -e
Question: 13. What are the default ports used for SMTP,DNS,FTP,DHCP,SSH and squid ?
Answer: Service Port
SMTP 25
DNS fifty three
FTP 20 (information transfer) , 21 ( Connection mounted)
DHCP 67/UDP(dhcp server) , 68/UDP(dhcp consumer)
SSH 22
Squid 3128
Question: 14. What is Network Bonding ?
Answer: 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.
Question: 15. What are the extremely good modes of Network bonding in Linux ?
Answer: 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.
Question: 16. How to check and confirm the popularity the bond interface.
Answer: 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.
Question: 17. How to test default direction and routing table ?
Answer: Using the Commands ‘netstat -nr’ and ‘route -n’ we are able to see the default course and routing tables.
Question: 18. How to test which ports are listening in my Linux Server ?
Answer: Use the Command ‘netstat –listen’ and ‘lsof -i’
Question: 19. List the offerings which might be enabled at a specific run diploma in linux server ?
Answer: 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.
Question: 20. How to allow a provider at a specific run degree ?
Answer: We can allow a provider the use of the Command ‘chkconfig
Question: 21. How to improve Kernel in Linux ?
Answer: 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.
Question: 22. How To experiment newly asssigned luns on linux field with out rebooting ?
Answer: 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
Question: 23. How to discover WWN numbers of HBA playing cards in Linux Server ?
Answer: We can discover the WWN numbers of HBA gambling playing cards the usage of grep port_name’
Question: 24. How to characteristic & exchange the Kernel parameters ?
Answer: 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.
Question: 25. What is Puppet Server ?
Answer: 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.
Question: 26. What are manifests in Puppet ?
Answer: Manifests in Puppet are the files in which the patron configuration is particular.
Question: 27. Which Command is used to signal asked certificates in Puppet Server ?
Answer: ‘puppetca –signal hostname-of-agent’ in (2.X) & ‘puppet ca sign hostname-of-agent’ in (3.X)
Question: 28. At which region Puppet Master Stores Certificates ?
Answer: /var/lib/puppet/ssl/ca/signed
Question: 29. How to locate all of the everyday files in a listing ?
Answer: the use of the command ‘find out / Question: 30. What is load commonplace in a linux ? Answer: 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.