Linux Interview Questions and Answers

Linux Interview Questions and Answers

Prepare for your Linux job interview with this list of top Linux Interview Questions and Answers for Freshers and Experienced which is Prepared by 10+ Years Experienced Linux Experts.

Linux Interview Questions and Answers

Linux Interview Questions and answers for beginners and experts. List of frequently asked Linux Interview Questions with answers by Besant Technologies. We hope these Linux Interview Questions and answers are useful and will help you to get the best job in the networking industry. This Linux Interview Questions and answers are prepared by Linux Professionals based on MNC Companies expectation. Stay tuned we will update New Linux Interview questions with Answers Frequently. If you want to learn Practical Linux Training then please go through this Linux Training in Chennai and Linux Training in Bangalore

Best Linux Interview Questions and answers

Besant Technologies supports the students by providing Linux Interview Questions and answers for the job placements and job purposes. Linux is the leading important course in the present situation because more job openings and the high salary pay for this Linux and more related jobs. We provide Linux online training also for all students around the world through the Gangboard medium. These are top Linux Interview Questions and answers, prepared by our institute experienced trainers.

Linux Interview Questions and answers for the job placements

Here is the list of most frequently asked Linux Interview Questions and answers in technical interviews. These questions and answers are suitable for both freshers and experienced professionals at any level. The questions are for intermediate to somewhat advanced Linux professionals, but even if you are just a beginner or fresher you should be able to understand the answers and explanations here we give.

Linux Interview Question and Answer

Q1)What is the difference between chmod and chown.

Q2)How to check the default run level.

Q3)What is the ID for Logical volume management?

Q4)What is the steps if the remote server is not connecting?

Q5)Explain how to stop ssh connection for a particular server or network.

Q6)How we are giving file permission for the particular user.

Q7)I need to check the particular service opened or not. Please explain.

Q8)How to enable/disable the services in particular run level.

Q9)Explain nfs hard and soft mount. :

Q10)What is the difference between YUM and rpm.

Q11)What is the command to check the size of file or directory?

Q12) Which one is the default sticky bit directory?

Q13)How to check how many files opened in Linux.

Q14)How to find zombie process and how to kill?

Q15)What is the command for extract RPM?

Q16)Assume the / partition got read only error, what steps has to be take.

Q17)How to find out whether the particular user locked or not?

Q18)Please let us know how to stop the ssh service from a particular node.

Q19)What is the command to check password expire information for the particular user.

Q20)How to recover if the user deleted by mistake?

Q21)How to put never expiry to a user?

Q22)How to find the users who are login and how to kill them?

Q23)How can you make a service run automatically after boot?

Q24)How to check whether the ssh is running or not on the remote host?

Q25)How to check the remote server services are running or not?

Q26)Explain about kernel panic error.

Q27)Step out if you are facing too many file system while login via ssh?

Q28)How to disable direct root login?

Q29)Which is default sticky bit directory?

Q30)How to check the integrity of a file system or consistency of the file system?

Q31)How many types of disk space issues can we normally get?

Q32)What is the command to check default run level.

Q33)A system is able to ping locally but not out site. Why?

Q34)If not able to create the file in any partition, what might be the issue.

Q35)Explain ping Command?

Q36)Explain how to check cron job particular user.

Q37)Kernel path

Q38)What is linux library file extension,

Q39)What command use for check IP address?

Q40)How many type of class and explain?

Q41)What command use for save and exit?

Q42)Expline restart the system?

Q43)How to create the use?

Q44)How to assign password the user?

Q45)How to login the user?

Q46)How to check user list?

Q47)How to create group?

Q48)How to add user the group?

Q49)Explained date Command?

Q50)What is relevance of $?

Q51)What happens if #/bin/php as shebang in a script.

Q52)Whether Nested if-else is possible in bash scripting?

Q53)Which is the best command that can be used for checking selinux activation status

Q54)If we need to escape single quote (‘) in echo, what is the process

Q55)What is load-average in linux.

Q56)How tree format of format listed

Q57)What is the use of the command top

Q58)What is symbolic link or symlink?

Q59)What are the features of /proc folder

Q60)How to find a pattern from a file or command?

Q61)Find who all are logged in to the system?

Q62)Which Terminal you are working in?

Q63)What to do if $PATH is lost, and its output is blank?

Q64)Command ifconfig is not found in my system, how to get my ip address

Q65)What is the method to run a command in background?

Q66)How to list selinux users?

Q67)My command ‘setenforce 0’ is not working, what to do?

Q68)What are the known commands for disk partitioning?

Q69)Can we have dynamicity for my disk?

Q70)What make LVM different from ext3 and ext4

Q71)When I executed ‘vgchange -ay’, I could find another lvm disk attached. How to get it mounted in my system.

Q72)How many primary partitions are created by default?

Q73)Which is the hexadecimal code for LVM

Q74)A rpm package is owned by some third-party vendor. How to get the vendor details of an rpm?

Q75)rpm -qf /sbin/vi : What is the output of this command?

Q76)Which command will list the current time source?

Q77)Write the command to list all ports added in firewall.

Q78)What does the following command does?

Q79)What are the list of sequence of commands to enable Kerberos authentication

Q80)What to do for enabling remote logging?

Q81)Which Directive in Apache Virtualhost defines the path of the web files?

Q82)What is the relevance of DirectoryIndex?

Q83)What is the difference between passwd and htpasswd

Q84)Which SELinux policy is used for Apache WebServer?

Q85)Instead systemctl, which all commands used for handling apache service.

Q86)How to display all WebSite VirtualHost?

Q87)How to set the SMTP port for all IPs in the servers? How to do this without editing the configuration in Postfix.

Q88)If we have 2 smtp service installed in the server, how to switch to the required one?

Q89)What is PTR record in Bind Zone?

Q90)Which are two main command in bind inorder to make sure that Bind will work perfectly.

Q91)How to lookup a domain using public DNS?

Q92)How to reverse lookup for IP address?

Q93)How to take backup of my wordpress DB?

Q94)Restore wordpress DB to mySQL

Q95)Instead of using ‘reboot’ or ‘shutdown -r’, which command can be used in Linux to do this.

Q96)Which attribute is set for executable on group level.

Q97)Mkdir -p can create

A.Both b and c

B.Parent directory

C.Sub directory

D None of above

Q98)Changing from current directory to root directory /root .. /boot /

Q99)Bash shell has inbuilt cmds. They are



C .both


Q100)What option in touch cmd allows to display Time of our wish.

A.Touch -t 201812190820 file

B.touch -t yyyymmddhrmin file

C.touch file


Q101)To reduce the risk of accidentally removing file what option must be used.

A.Rm -i

B.Rm -rf


D.none of above

Q102)To preserve permission and Time stamp on file while copying.

A.cp -p

B.cp -s

C.cp -d

D.none of above

Q103)how to display cat output in reverse order file reverse

B.concate file

C.tac file


Q104)Dir that contain data which is served by system





Q105)Cmd to exit current shell




D.all of above

Q106)Cmd to get list of color output

A.Ls - -color

B.Ugoa rwx

C.421 rwx

D.Chmod u=rwx,g+x file name.

Q107)binary form of r-x


B 101



Q108)cmd to find files between 15-20 days

A.find /dirpath -mtime 15-20

B.find /dirpath -mtime +15 -mtime -20

C.find /dirpath |grep mtime 15-20


Q109)cmd to view files


C. head/tail


Q110)Navigating letters inside vi editor





Q111)comparing two files cmds.





Q112)what option with grep cmd give the count of number of occurance in file


B. -c


D..none of above.

Q113)cmd to combine standard error and standard output



C. 1&2>


Q114)if 0 to 6 are week indication in crontab then scheduling

Job in Monday will be

Q115)su – user.What hypen do

A.Setup user login environment similar as that of direct user

B.we need to use because it’s the only format to use su cmd

C.none of above

D.both a &b

Q116)wich of the directory can be. Considered as black hole in Linux





Q117)system user has uid value is



C.500 to 65534

D.only root user have uid's

Q118)if source file gets deleted, which one can still access destination file

A.Hard link

B.Source file cannot be delated

C.Soft link

D.Destination file is independent of source file

Q119)remote file systems are





Q120)What blocks are created when formating file system using extend file system in linux

A.Master and super block

B.Data and inode block

C.Both a&b


Q121)option to erase rpm package in Linux.

Q122)to remove a file system..unmounting is done first

A .ture


Q123)cmd to check ram available space in linux

A .free -ram -m



Q124)Which file in system is responsible for providing sudo access





Q125)Cmd to put user password to non-expiry state.

A.Passed user

B.Passwd -x 99999 user

C.Psswwd -e user


Q126)cmd to copy files in between the connected server

A.scp filename user@server:/destination

B.winscp filename user@server:/destination

C.cp -v filename user@server:/destination


Q127)cmd to make ext file systems

A.resize2fs ext

B.mkfs ext

C.pvcreate ext

D.lvcreate ext

Q128)authentication logs are available in





Q129)rebooting server can be followed by


B.init 6

C.init 0

D.Both a&b

Q130)What is the directory name where ssh key pair gets generated( ssh-keygen -t rsa)





Q131)which of the below is not a filter cmd




Q132)jobs can be schedule using

A.crontab cmd

C.both a and b

D.sudoers file

Q133)which cmd gives info on how long server is running after it starts


B.server time


D.reboot time

Q134)How to make a file immutable / ubdeletable in linux ?

Q135)which is network related cmd in lnux



C.netstat -m


Q136)which cmd is used to renice the process or priority



D.all of above

Q137)Cmds to see system usage on linux


D.only a b


Q138)troubleshooting tools in Linux





Q139)The partitioning of disk in primary partition defines under


B.Master boot record


D.None of them.

Q140)to mark the created swap space as must put entry in





Q141)Where is rpm database located in linux





Q142)cmd to change hostname to Rakesh


B.sysctl kernal.hostname=Rakesh

C.both b and a

Q143)To check the status of inbuilt firewall in Linux

A.service iptables status

B.service network status

C.both of them

D.none of them.

Q144)cmd to create samba password

A.smbpassword -a user

B.passwd user

C.sambapasswd user

D.None of them.

Q145)ssh protocols features are provide secure channel one can intercept the communication

C.authentication info are less secure.

D.a &b

Q146)removing subscriptions cmds in ljnux

A.subscription-manager –remove –serial=serial number

B.subscription-manager remove –serialnumber

C.subscription-manager remove –serial=serial number


Besant Technologies – Chennai & Bangalore Branch Locations

Besant Technologies - Velachery Branch
Plot No. 119, No.8, 11th Main road, Vijaya nagar,
Velachery, Chennai - 600 042
Tamil Nadu, India
Landmark - Reliance Digital Opposite Street
+91-996 252 8294 / 996 252 8293

Besant Technologies - Tambaram Branch
No.2A, 1st Floor, Duraisami Reddy Street,
West Tambaram, Chennai - 600 045
Tamil Nadu, India
Landmark - Near By Passport Seva
+91-996 250 4283

Besant Technologies - OMR Branch
No. 5/318, 2nd Floor, Sri Sowdeswari Nagar,
OMR, Okkiyam Thoraipakkam, Chennai - 600 097
Tamil Nadu, India
Landmark - Behind Okkiyampet Bus Stop,
+91-887 038 4333

Besant Technologies - Porur Branch
No. 180/84, 1st Floor, Karnataka Bank Building
Trunk Road, Porur,
Chennai - 600 116
Tamilnadu, India
Land Mark: Opposite to Gopalakrishna Theatre
+91-755 022 6990

Besant Technologies - Anna Nagar Branch
Plot No:1371, 28th street kambar colony,
I Block, Anna Nagar ,
Chennai - 600 040
Tamil Nadu, India
Landmark - Behind Reliance Fresh
+91-938 404 0493

Besant Technologies - T.Nagar Branch
Old No:146/2- New No: 48,
Habibullah Road,T.Nagar,
Chennai - 600 017
Tamil Nadu, India
Landmark - Opposite to SGS Sabha
+91-984 025 8377

Besant Technologies - Thiruvanmiyur Branch
22/67, 1st Floor,
North mada street, Kamaraj Nagar
Thiruvanmiyur, Chennai 600041
Tamil Nadu, India
Landmark - Above Thiruvanmiyur ICICI Bank
+91-938 404 0493

Besant Technologies - Siruseri Branch
No. 4/76, Ambedkar Street,
OMR Road, Egatoor, Navallur,
Siruseri, Chennai 600130
Tamil Nadu, India
Landmark - Near Navallur Toll Gate, Next to Yamaha Showroom
+91-7338 810 550

Besant Technologies - Maraimalai Nagar Branch
No.37, Ground Floor,
Thiruvalluvar Salai,
Maraimalai Nagar,Chennai 603209
Tamil Nadu, India
Landmark - Near to Maraimalai Nagar Arch
+91-979 123 7373

Besant Technologies - BTM Layout Branch
No 2, Ground floor,
29th Main Road, Kuvempu Nagar,BTM Layout 2nd Coming from Silkboard, take left at AXA company signal,
Stage, Bangalore - 560 076
Karnataka, India
Landmark - Next to OI Play School
+91-762 494 1772 / 74

Besant Technologies - Marathahalli Branch
No. 43/2, 2nd Floor, VMR Arcade,
Varthur Main Road, Silver Springs Layout,
Munnekollal, Marathahalli, Bengaluru - 560037
Karnataka, India
Landmark - Near Kundalahalli Gate Signal
+91-910 812 6341

Besant Technologies - Rajaji Nagar Branch
No. 309/43, JRS Ecstasy, First Floor,
59th Cross, 3rd Block, Bashyam Circle,
Rajaji Nagar, Bangalore - 560 010
Karnataka, India
Landmark - Near Bashyam Circle
+91- 734 916 0004

Besant Technologies - Jaya Nagar Branch
No. 2nd Floor,1575,11th Main Road,
4th T-Block, Pattabhirama Nagar, Jaya Nagar,
karnataka, India
Land Mark: Opposite to Shanthi Nursing Home
+91-733 783 7626

Besant Technologies - Kalyan Nagar Branch
No.513, 4th Cross Rd
2nd Block, HRBR Layout, Kalyan Nagar,
karnataka, India
Land Mark: Opposite to kalayan nagar Axis Bank
+91-938 404 0495

Besant Technologies - Electronic City Branch
No. 7, 3rd Floor, Ganga Enclave,
Neeladri Road, Karuna Nagar, Doddathoguru Village,
Electronics City Phase 1, Electronic City,
Bangalore - 560100, karnataka, India
Land Mark: Adjacent to HDFC Bank and State Bank Of India
+91-782 392 2180

Besant Technologies - Indira Nagar Branch
No.54, 1st Floor,
5th Main kodihalli,
Bengaluru, Karnataka 560008, India
Landmark: Behind Leela Palace Hotel,
+91-910 812 6339

Besant Technologies - HSR Layout Branch
Plot No. 2799 & 2800, 27th Main,
1st Sector, HSR Layout,
Bengaluru, Karnataka 560102, India
+91-733 783 7626