Linux Interview Question & Answer Part – 2

We have already released our first part. Now we are going to make the second part. If you have any suggestion/doubts pls share your comment in our comment section, Pls do not post any negative comments because i’m spend lots of time to preparing this articles. If you give a suggestion/feedback’s we will take a opportunity to improve our blog based on that.

Question : 1) Which one is showing only hidden files ?

a) ls -l
b) ls -lh
c) ls -al
d) l. -lh

Answer : l. -lh
All the above commands listing files and folder and (ls -al) command showing all files included hidden files but (l. -lh) command showing only hidden files.

Question : 2) Which one is the correct syntax for Reverse RSYNC command ?

a) rsync -[Options] [Destination-Location] [Source-Location]
b) rsync -[Options] [Source-Location] [Destination-Location]
c) rsync .[Options] [Destination-Location] [Source-Location]
d) rsync [Options] [Source-Location] [Destination-Location]

Answer : rsync -[Options] [Destination-Location] [Source-Location]
Normally rsync command is used to sync the backup from local server to remote server but unfortunately you haven’t do that. That time the reverse rsync command is used to fetch the data from local server to remote server.

Question : 3) Which command is used to open the website in terminal ?

a) links
b) elinks
c) Both
d) Only elinks

Answer : Both
We can open the website in linux terminal using the above command but make sure the packages should be installed on your server.

Question : 4) Which command is used to open Postscript/pdf file in linux ?

a) gv
b) od
c) xdvi
d) xxd

Answer : gv
The gv command used to open the pdf file in terminal.

Question : 5) By default how many day’s systat config file keep the sa log files?

a) 5
b) 7
c) 12
d) 9

Answer : 7
By default systat config file keep the 7 days sa logs and maximum of days 28.

Question : 6) Where is the sa log file location on RHEL/CentOS/Fedora ?

a) /var/log/sysstat/
b) /var/log/sa
c) Both
d) Only /var/log/sysstat/

Answer : /var/log/sa

Question : 7) How to check service status in linux ?

a) service service-name status
b) /etc/init.d/service-name status
c) Both
d) Only /etc/init.d/service-name status

Answer : Both
The above both command is used to check the daemon stauts in linux.

Question : 8) Which command is clearly shows the open port and binded daemon details ?

a) netstat -vatn
b) netstat -vaun
c) netstat –listen
d) netstat -tulpn

Answer : netstat -tulpn
All the above command is used to check the open port in linux server but “option d” is clearly shows the exact results what we needed.

Question : 9) What is the use of Toggle SSH Session via SSH Escape Character ?

a) Open multiple terminal in single windows
b) One terminal to another terminal without entering password
c) One terminal to another terminal without logged out
d) b & c

Answer : b & c
If i use Toggle SSH session, we need to enter the password one time after that we can jump one terminal to another and return back previous terminal.

Question : 10) Where is mysql history file located ?

Answer : By default, the backup history file was stored or located under root directory. Now, i’m going to show the details here.

Output :
[email protected] [~]# find / -name ".mysql_history"

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

Your email address will not be published. Required fields are marked *