Top 30 Linux System Admin Interview Questions
Top 30 Linux System Admin Interview Questions
In this article we will discuss top 30 linux system admin interview questions with the answers for experience professionals. Below mentioned
questions may help the readers to clear Linux interviews. If you like these questions , please don’t hesitate to share on Facebook, google+ and
Twitter.
Ans: LVM stands for Logical Volume Manager , to resize filesystem’s size online we required LVM partition in Linux. Size of LVM partition
can be extended and reduced using the lvextend & lvreduce commands respectively.
Ans: Using ‘free’ & ‘vmstat’ command we can display the physical and virtual memory statistics respectively.With the help of ‘sar’ command
Q:3 What does Sar provides and at which location Sar logs are stored ?
Ans: Sar Collect, report, or save system activity information. The default version of the sar command (CPU utilization report) might be one of the
first facilities the user runs to begin system activity investigation, because it monitors major system resources. If CPU utilization is near 100
By default log files of Sar command is located at /var/log/sa/sadd file, where the dd parameter indicates the current day.
– Use the lvextend command (lvextend -L +100M /dev/<Name of the LVM Partition> , in this example we are extending the size by 100MB.
Ans: Below are the logical Steps to reduce size of LVM partition :
Above Command will shrink the size & will make the filesystem size 10GB.
Ans: Using fdisk utility we can create partitions from the raw disk.Below are the steps to create partition from the raw dsik :
– After creating partition , type w command to write the changes to the partition table.
Ans: The ‘/lib/modules/kernel-version/’ directory stores all kernel modules or compiled drivers in Linux operating system. Also with ‘lsmod’
Ans: umask stands for ‘User file creation mask’, which determines the settings of a mask that controls which file permissions are set for files and
Ans: To set this value permanently for a user, it has to be put in the appropriate profile file which depends on the default shell of the user.
Ans: To change the run level we have to edit the file “/etc/inittab” and change initdefault entry ( id:5:initdefault:). Using ‘init’ command we
change the run level temporary like ‘init 3’ , this command will move the system in runlevl 3.
Ans: To share a directory using nfs , first edit the configuration file ‘/etc/exportfs’ , add a entry like
Ans: Using ‘showmount’ command we can see what directories are shared via nfs e.g ‘showmount -e <ip address of nfs server>’.Using mount
Q:13 What are the default ports used for SMTP,DNS,FTP,DHCP,SSH and squid ?
SMTP 25
DNS 53
SSH 22
Squid 3128
Ans: Network bonding is the aggregation of multiple Lan cards into a single bonded interface to provide fault tolerance and high performance.
balance-xor or 2 – Sets an XOR (exclusive-or) mode for fault tolerance and load balancing.
broadcast or 3 – Sets a broadcast 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 groups that share the same speed & duplex settings.
balance-tlb or 5 – Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.
balance-alb or 6 – Sets an Active Load Balancing (ALB) mode for fault tolerance & load balancing.
Q:16 How to check and verify the status the bond interface.
Ans: Using the command ‘cat /proc/net/bonding/bond0’ , we can check which mode is enabled and what lan cards are used in this bond. In this
example we have one only one bond interface but we can have multiple bond interface like bond1,bond2 and so on.
Ans: Using the Commands ‘netstat -nr’ and ‘route -n’ we can see the default route and routing tables.
Ans: With the help of command ‘chkconfig –list | grep 5:on’ we can list all the service that are enabled in run level5. For other run levels just
Ans: We can enable a service using the Command ‘chkconfig <Service-Name> on –level 3’
Ans: We should never upgrade Linux Kernel , always install the new New kernel using rpm command because upgrading a kenel can make your
Q:22 How To scan newly asssigned luns on linux box without rebooting ?
Ans: We can find the WWN numbers of HBA cards using the command ‘systool -c fc_host -v | grep port_name’
Ans: To Set the kernel parameters in linux , first edit the file ‘/etc/sysctl.conf’ after making the changes save the file and run the command ‘sysctl
-p’ , this command will make the changes permanently without rebooting the machine.
Ans: Puppet is an open-source & enterprise software for configuration management toll in UNIX like operating system. Puppet is a IT
automation software used to push configuration to its clients (puppet agents) using code. Puppet code can do a variety of tasks from installing
new software, to check file permissions, or updating user accounts & lots of other tasks.
Ans: Manifests in Puppet are the files in which the client configuration is specified.
Ans: ‘puppetca –sign hostname-of-agent’ in (2.X) & ‘puppet ca sign hostname-of-agent’ in (3.X)
Ans: /var/lib/puppet/ssl/ca/signed
Ans: Load Average is defined as the average sum of the number of process waiting in the run queue and number of process currently executing
over the period of 1,5 and 15 minutes. Using the ‘top’ and ‘uptime’ command we find the load average of a Linux sever.
Share
0
0
Comments38
Pingbacks0
1. manish meshram
May 13, 2014 at 4:50 pm
I like your Linux interview questions you put some more question on this site
Reply
o admin
May 18, 2014 at 6:23 am
Thanks Manish , In Coming Future we will posting lot of interview questions on different
categories.
Reply
2. praveen
November 22, 2014 at 6:55 pm
hi admin i will be much happy if you post some of real time roles and responsiblity of linux
admin for freshers:-)
in fact there is not doubt in your articles they are really helpful
Reply
3. Hemant Singh
December 27, 2014 at 3:01 pm
Thanks for providing such type of collective tutorials
Reply
5. lokesh karri
January 26, 2015 at 5:36 pm
Great..! If possible please post real time scenario based questions….,
Reply
6. P.V.Satheesh
February 3, 2015 at 12:17 pm
Well Explained !!!
Reply
7. Raghavendra
March 7, 2015 at 9:52 am
Very Good and unique questions as like Real time…. Great Job!! keep doing
— Raghavendra Gujjar
Reply
8. anno
March 24, 2015 at 1:48 pm
Very good Linux Admin question.
Really very good knowledge sharing.
Reply
9. sreenu
March 29, 2015 at 3:53 am
these question are very good but please add some more question
Reply
10. stephane
April 28, 2015 at 12:15 pm
tanks very much for the linux questions.
Reply
13. surya
June 4, 2015 at 12:32 pm
hi sir.. very useful interview questions.. no site is providing topic-wise interview questions .. so if
u can provide them topic wise it will be very helpful for all.
Reply
14. shailendra
June 19, 2015 at 3:27 pm
I like your Linux interview questions..
i have que.. if any one can help on this .
1. i have schedule 1000 jobs at same time with cron, need to know if all will run at same time or
they run one by one ..
thanks you
Reply
o Mohi Gupta
September 29, 2015 at 6:35 am
They all will be executed at the same time.
Reply
15. Anil
July 29, 2015 at 5:09 am
good job …. really useful information
Reply
16. Solomon
August 4, 2015 at 5:49 pm
Good stuff,
Q11>>>Little error: the configuration file for NFS; /etc/exports not /etc/exportfs. the command
to populate it is: exportfs
Q19>>>chkconfig –list not chkconfig -list
o Karn
August 10, 2015 at 4:48 pm
@Noor ahmed : there is no such single command to Kill 20-30 PID’s . You can either manually
kill them or setup a small script..as below..
lets suppose you have PID’s to Kill with you:
$ for i in `cat`;do kill $i;done
12
13
101
99
….etc…
Ctrl+d
or if you want to kill all the process related to a particular service , like have an example of ssh
service..you can do as below…
$ pgrep sshd | while read p;do kill $p;done (it will kill all the process related to sshd in one go)
Reply