20 Good Linux Interview Questions and Answers
In this article we are going to see Interview questions and answers, which are asked in one of the company interview. Exclusive Interview questions and answers for you. 20 Good Linux interview questions and answers.
20 Good Linux Interview Questions and Answers
1. How to check memory stats and CPU stats.?
Ans: Using vmstat command we can check memory stats and CPU stats. We can also check memory usage and CPU usage in real time using top command
2. How to change the default run level in Linux.?
Ans: In RHEL/Centos 5/6 by changing the value in /etc/inittab file as mentioned below
[root@Arkit-RHEL6 ~]# vi /etc/inittab |grep id # Individual runlevels are started by /etc/init/rc.conf id:5:initdefault:
3. What are the default ports used for SMTP,DNS,FTP,DHCP, SSH and HTTP.?
- SMTP = 25
- DNS = 53
- FTP = 20 and 21
- DHCP = 67 and 68
- SSH = 22
- HTTP = 80 and HTTPS = 443
4. How to check which ports are listening in my Linux Server.?
Ans: Using nmap, netstat and lsof commands we can check which are the ports listening in local host
# nmap -sT -O localhost # ss -tunlap # netstat -anp
5. How to add & change the kernel parameters.?
Ans: We can change the kernel parameters using /etc/sysctl.conf file
6. What is Puppet Server.?
Ans: Puppet software is a open-source configuration management tool. Which will support for multiple operating system such as Unix-like systems and Microsoft windows.
7. What are Symbolic Links and hard links.?
Ans: Symbolic links are the links which reference to actual files with other nicknames. We can add symbolic links to files and directories.
8. How to you execute more than one command or programs from Crontab entry.?
Ans: It is well possible to run/execute more commands from single crontab schedule by adding semicolon in between multiple commands.
# crontab -e * * * * * cat /etc/passwd; ls -l /etc/ >> /tmp/etcfiles
9. Write a command that will look for files with an extension “c”, the string “apple” in it.?
# find / -name "*.c" -print | xargs grep apple
10. What, if anything, is wrong with each of the following commands
- ls -l-s
- cat file1, file2
- ls -s Factdir
Ans: There is no space used in ls -l-s command. Correct command is ls -l -s. In cat command we do not use ,(comma) for reading multiple files. Correct command is cat file1 file2
11. What is the difference between cron and anacron.?
Ans: cron jobs will run when server/machine is online 24/7. Anacron does not required to be online 24/7 like server when machine is switched on scheduled jobs will run
12. What are the fields in the /etc/passwd file.? Please explain.?
# cat /etc/passwd charan:x:1003:1003:Administrator from HYD:/home/charan:/bin/bash
- charan = User Name
- 1003 = UID
- 1003 = GID group id
- Administrator from HYD = Description of the user
- /home/charan = Home directory of charan user
- /bin/bash = Default shell prompt is bash for charan user
13. How Environment variable is set so that the file permissions assign the newly created files.?
Ans: By setting umask value newly created files will get default permissions
14. If you have only on IP address, but you want to host two web sites. What will you do.?
Ans: Create multiple virtual hosts using different ports
15. How do you check for the httpd.conf consistency..?
Ans: Using apachectl configtest command we check http.conf file consistency and errors
16. What is ‘.htaccess’ file in Apache web server.?
Ans: .htaccess file is a Hypertext Access file which is used to write URL redirection and SSL certification configuration etc..
17. In ‘kill -9’ command, what is the ‘-9’ signal indicates..?
Ans: -9 represent SIGKILL which means Kill signal
18. What are the process states in Unix.?
- Running State
- Stopped State
- Sleeping State
- Uninterrupted sleep state
- Defcunt State Or zombie State
19. List out different multi-processing modules in Apache web server description about it.?
Ans: mpm_worker_module is a module multi-processing module
20. What are the different storage engines used in MySQL..?
Below are the few MySql storage engines
Thanks for the read. We hope above questions and answers are useful for you. 20 Good Linux Interview Questions and Answers
20 Good Linux Interview Questions and Answers 20 Good Linux Interview Questions and Answers 20 Good Linux Interview Questions and Answers
Thanks for your wonderful Support and Encouragement
- Do Not Miss Interesting and Important Articles: Signin Now
- Download free PDF Books : Download Anything and Everything for Free
- Stay Connected with Us: Facebook Page | Twitt | Google Plus | LinkedIn | RSS feeds
- High Qualitfy Video Tutorials : All Videos
- Still You Have Question? : Ask Us
Click on above colored text to access appropriate page