10 Useful Interview Questions on Linux Services and Daemons
Daemon is a computer program that runs as a background process and generally do not remains under the direct control of user. The parent process of a daemon in most cases are init, but not always.
In Linux, a Service is an application that runs in a background carrying out essential task or waiting for its execution.
Generally, there is no difference between a Daemon and a Service. Daemon is Service but service may be bigger than Daemon. Daemon provide some services and services may contain more than one Daemon.
Here in this series of Interview Article, we would be covering Services and Daemons in Linux.
1. What is Exim Service? What is the purpose of this Service?
2. What is NIS server? What is the purpose of NIS Server?
3. What will you prefer for a reverse proxy in Linux?
4. You are getting following codes (2xx, 3xx, 4xx, 5xx) in Apache, at some point of time. What does this means?
5. You are asked to stop Apache Service through its control Script. What will you do?
# apachectl stop [On Debian based Systems] # /etc/inid.t/httpd stop [On Red Hat based Systems]
6. How is ‘apachectl restart’ different from ‘apachectl graceful’
7. How will you configure the nfs mounts to export it, from your local machine?
8. You are supposed to create a new Apache VirtualHost configuration for the host www.Tecmint.com that is available at /home/Tecmint/public_html/ and maintains log at /var/log/httpd/ by default.
<VirtualHost *:80> DocumentRoot /home/Tecmint/public_html ServerName www.Tecmint.com Server Alias Tecmint.com CustomLog /var/log/httpd/Tecmint.com.log combined ErrorLog /var/log/httpd/Tecmint.com.error.log </VirtualHost>
9. You are supposed to dump all the packets of http traffic in file http.out. What will you suggest?
# tcpdump tcp port 80 -s0 -w http.out
10. How will you add a service (say httpd) to start at INIT Level 3?
chkconfig –level 3 httpd on
That’s all for now. I’ll be here again with another interesting article very soon. Till then stay healthy, tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback in the comment section below.