0% found this document useful (0 votes)
15 views

Lecture 2i System Services NIS

This document discusses Linux system services. It defines services as applications that run in the background to perform tasks. Common services include init, xserver, cron, and cups. Services are typically located in /etc/init.d. The document outlines how to list, start, stop, restart, enable and disable services using commands like service, chkconfig, sysv-rc-conf, and update-rc.d. It also discusses runlevels which determine what services are started at different states like rebooting or shutting down.

Uploaded by

Areef
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Lecture 2i System Services NIS

This document discusses Linux system services. It defines services as applications that run in the background to perform tasks. Common services include init, xserver, cron, and cups. Services are typically located in /etc/init.d. The document outlines how to list, start, stop, restart, enable and disable services using commands like service, chkconfig, sysv-rc-conf, and update-rc.d. It also discusses runlevels which determine what services are started at different states like rebooting or shutting down.

Uploaded by

Areef
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

System Services

21/06/17 System Services - Linux Training 1/9


What are Linux Services?
A Linux service is an application (or set of
applications) that runs in the background waiting
to be used, or carrying out essential tasks.
The are normally referred to as daemons
Example:
init
xserver
cron
cups
Where to find the services
/etc/init.d

21/06/17 System Services - Linux Training 2/9


Managing System Services

21/06/17 System Services - Linux Training 3/9


Objectives
Listing Services
Displaying Service Status
Starting a Service
Stopping a Service
Restarting a Service
Enabling a Service
Disabling a Service

21/06/17 System Services - Linux Training 4/9


Runlevels
S - true single user mode usually drops you into a minimal root
shell
1 - Administrative mode, you get a standard login request before
access
2 - Multi-user without TCP/IP networking -- could use serial ports
for other logins
3 - Multi-user with TCP/IP networking and text
4 - To be determined by the system owner
5 - Multi-User with TCP/IP networking and graphic console
6 - reboot
0 - shutdown and power down

21/06/17 System Services - Linux Training 5/9


Change runlevel permanently
Debian-based Linux
/etc/init/rc-sysinit.conf

RMP-based Linux
/etc/inittab

Check a file with initdefault possibly inside /etc


grep -r initdefault /etc

21/06/17 System Services - Linux Training 6/9


Listing/Display Services
service command:
Options
--status-all use to display all installed service on a linux
machine
chkconfig command:
Useful with rpm based systems
chkconfig --list
sysv-rc-conf command:
Useful on Debian-based systems.
sysv-rc-conf --list

21/06/17 System Services - Linux Training 7/9


Stop/Start Services
Starting a service:
service command:
service service-name start
update-rc.d command:
update-rc.d service-name start 20 2 3 4 5 . stop 80 0 1 6 .

Restarting a service:
service command:
service service-name restart

Stopping a service:
service command:
service service-name stop
21/06/17 System Services - Linux Training 8/9
Enable/Disable Services
Enable a service:
update-rc.d command:
update-rc.d service-name start 20 2 3 4 5
sysv-rc-conf command:
sysv-rc-conf --level 35 service-name on
chkconfig command:
chkconfig --level 35 service-name on
insserv command:
insserv service_name
Disable a service:
Update-rc.d command:
update-rc.d service-name stop
21/06/17 System Services - Linux Training 9/9

You might also like