Linux Interview Questions

These are some of the Interview questions we were using while conducting L1, L2 & L3 level interviews, I’ll not posting any answers to these questions as it’s open up to you to search and find the answers. It will help you to understand the topic and you’ll remember the answers all the time.

What is the difference between kernel image and initrd image?

Why is root file system mounted read-only initially?

What will happen if it is mounted read-write?

What are the process states in Linux?

Which log files holds the information of currently logged users?

What is called a fork bomb?What is its relevance?

What is the difference between commands last and lastb?

How do you ensure your users have hard-to-guess passwords?

What is log rotate and Why is it used in a Linux system?

How will you increase the priority of a process?

What is the range for the priority of the processes?

I have a file named “/ \+Xy \+\8_/ \” How do I get rid of it?

What does the command pvscan do?

How will you probe for a new SCSI drive?

How will you take a system backup image for recovery?

What will the command chage –E -1 do?

What will the command option –a will do for usermod?

What is the command gpasswd?

When debugging a core in gdb, what does the command `bt` give?

What do you mean by man (1) (5) and (8)?

How many fields in crontab and what are those?

To display a list of all manual pages containing the keyword “date”, which commad can be used?

What do you mean by restricted deletion flag?

What’s the difference between `telnet` and `ssh`? What’s a good use for each?

What will vgcfgbackup and vgcfgrestore do and can you explain with a scenario?

What is the difference between insmod and modprobe?

What to do if the newly built kernel does not boot?

What are TCP wrappers? What is the library responsible for TCP wrappers?

In how many ways you can block the traffic to ssh from a specific host?

How will you run ssh in debugging mode to identify a failure in establishing a connection?

Which file is responsible for kernel parameter changes?

What do you mean by hardening of a Linux server?How will you achieve this?

How will you tune a Linux server for maximum performance?

What is the use of commands clustat clusvcadm?

What is multipathing?Why is it used?

What is black-listing of devices in multipath?

Which command will display the current multipath configuration gathered from sysfs, the device mapper, and all other available components on the system?

What is multipath interactive console?

What is GFS?

How will you create a GFS file system?

What is called NIC bonding or teaming?

How will you repair a GFS file system?

 

SHELL SCRIPTING

How do you read arguments in a shell program?

How do you send a mail message to somebody within a script?

Which command is used to count lines and/or characters in a file?

How do you start a process in the background?

How will you define a function in a shell script?

How do you get character positions 10-20 from a text file?

What do you mean by getopts?

How do you test for file properties in a shell script?

How will you define an array?

How can you take in key-board inputs to a shell script?

What is meant by traps in a shell scripts?

Is it possible to use alphanumeric in for loop?

Write a Palindrome script?

Write a script to check no of machines up in network ( Provided list of hosts are available in a file)?

if u have f1;f2;f3 words, need to display f3 first then f1 and at last f2 using a script?

Print the numbers of 1 to 1000 in the format 0001,0002,0003………1000?