11.1 200+ Interview Questions
11.1 200+ Interview Questions
In some questions I am encouraging to search online because it will help you practice for
searching more complicated questions in the future
(Good Luck)
1. When you login you get “$” prompt, what is the prompt for root?
#
So, for example, you want to list files in directory and see only that ones which contains "mp4" or
"avi" extentions. With egrep you will do:
ls | egrep "mp4|avi"
In this example | acts like OR command it will grab to output from ls all names which contain either
"mp4" or "avi" strings. If you run it with plain grep command you will get nothing, because grep don't
know such thing as | command and it will search for "mp4|avi" whole text string (with pipe symbol).
E.g. if you have |MPG|cool-guy.q2.stats file in your dir, you will get it with plain grep searching with
pipes.
15. When you login you get a message on the screen. What is the name
of that file and where is it located?
/etc/motd
19. What is the version of Redhat Linux you have experience with?
7.4
24. Where are the zone files located for DNS service?
/var/named/zonefiles
35. What is the difference between “kill” and “kill -9” command?
Search online
37. You are troubleshooting an issue with Redhat support and they have
asked you to send the contents of /etc directory. How and which
method you will use to transfer the contents?
tar (compress) the entire /etc directory and ftp
50. Which directory has all the commands we use, e.g. ls, cd etc.?
/usr/bin or /bin
51. What is the difference between memory, virtual memory and cache?
Search online
57. Why is “tail –f logfilename” command used most often and what does
it do?
It will output all incoming logs in real time
65. What is the exact command syntax to list the 5th column of a file
and cut the first 3 letters?
cat filename | awk ‘{print $5}’ | cut –c1-3
67. List any 3 options of ‘df’ command and what they are used for?
Search online
83. You have scheduled a job using crontab but it does not run at the
time you specified, what could be the reason and how would you
troubleshoot?
Check your system time
Check your crontab entry
Check /var/log/messages
92. You noticed that one of the Linux servers has no disk space left,
how would you troubleshoot that issue?
If running LVM then add more disk and extend LVM
If not running LVM then add more disk, create a new partition and
link the new partition to an existing filesystem
96. How do you search for a pattern/word in a file and then replace it
in an entire file?
sed command
98. If a command hangs, how to stop it and get the prompt back?
Ctrl C
124. What is the file name where user password information is saved?
/etc/shadow
125. Which command you would use to find the location of chmod command?
which chmod
132. You are notified that your server is down, list the steps you will
take to troubleshoot?
Check the system physically
Login through system console
Ping the system
Reboot or boot if possible
143. Which command(s) you would run if you need to find out how many
processes are running on your system?
ps –ef | wc –l
147. Which among the following interacts directly with system hardware?
a) Shell
b) Commands
c) Kernel
d) Applications
151. What are a few commands you would run if your system is running
slow?
top, iostat, df –h, netstat etc.
155. Where is the network (Ethernet) file located, please provide exact
directory location and file name?
/etc/sysconfig/network-scripts/ifcfg-nic
158. To view your command history, which command is used and how to run
a specific command?
history and history #
159. What is NTP and briefly explain how does it work and where is the
config files and related commands of NTP?
Search online
164. If you create a new group, which file does it get created in?
/etc/group
165. Which file has DNS server information (e.g. DNS resolution)?
/etc/resolv.conf
166. What are the commands you would run if you need to find out the
version and build date of a package (e.g. http)?
rpm –qi http
167. On the file permissions? What are the first 3 bits for and who is
it for?
Read, write and execute. They are used for the owner of the file
173. What is the exact syntax of mounting NFS share on a client and
also how to un-mount?
Search online
177. You are tasked to examine a log file in order to find out why a
particular application keep crashing. Log file is very lengthy,
which command can you use to simplify the log search using a
search string?
grep for error, warning, failure etc. in /var/log/messages file
178. What is /etc/fstab file and explain each column of this file?
Search online
179. What the latest version of Windows server?
Search online
180. What is the exact command to list only the first 2 lines of
history output?
history | head -2
183. You have tried to “cd” into a directory but you have been denied.
You are not the owner of that directory, what permissions do you
need and where?
- - - - - - - r – x
184. What is CNAME record in DNS?
Entry for hostname to hostname
186. What is the client name used to connect to ESXi or vCenter server?
vSphere client
187. You get a call from a user saying that I cannot write to a file
because it says, permission denied. The file is owned by that
user, how do you troubleshoot?
Give write permission on the first 3 bits
190. Which command syntax you can use to list only the 20th line of a
file?
Search online
195. How to start a new shell. E.g. start a new ksh shell?
Simply type ksh, or bash
199. Which utility could you use to repair the corrupted file system?
fsck
201. How to combine 2 files into 1? E.g. you 3 lines in file “A” and 5
lines in file “B”, which command syntax to use that will combine
into one file of 3+5 = 8 lines
cat fileA >> fileB
205. You need to modify httpd.conf file but you cannot find it, Which
command line tool you can use to find file?
find / -name “httpd.conf”
206. Your system crashed and being restarted, but a message appears,
indicating that the operating system cannot be found. What is the
most likely cause of the problem?
The /boot file is most likely corrupted
207. Is there a way to make grep output "words" from files that match the search
expression?
grep -oh "\w*th\w*" *
208.