DEV Community

Cover image for Service management in Linux
Vishal Srikanth
Vishal Srikanth

Posted on

Service management in Linux

People who use Linux do know how to start/stop services with the front-end command line utilities like systemctl but they don’t really appreciate the stuff that happens behind the scenes just to start a service that you want to be already started.

In this blogpost, let me tell you all how service management happens in Linux operating systems, so you might appreciate this wonderful aspect of Linux.

Operating systems manage applications and services for you that run in foreground and background. Windows does in its own way. But Linux, the rock solid operating system for servers does this in a way that’s so awesome.

If you didn’t know how a system gets booted up, let me tell you in a nutshell.
First off, when you press that little plastic button on your machine, it starts with the whooshing sound of cooling fans. Then the system goes through something known as POST_(Power-On-Self-Test) process which is actually a set of diagnostic tests that a computer runs every time it's powered on to make sure all of its components are working properly. Next, the BIOS _(if it’s an older system) or UEFI (newer ones use this) starts up, which then look for the boot files especially the kernel. The kernel kicks in and starts the services.

But how does the kernel know the services it has to start, the ones it has to start on-boot , the ones which you wanna start on-demand?

That’s where a service management system comes into play!

Service management system is the one that actually starts up the services on-boot. I’m saying services but that doesn’t just include applications like MySQL, Apache web server engines. But the word services encompasses the networking stack, Storage I/O service, LVM ,NFS, anything you could think of.

Think of it. You just have an on-demand application like Firefox installed but without the TCP/IP networking stack started, can you even get anywhere? Or you have a hard-drive installed. If you can’t perform any I/O operations on it, what’s the purpose then?
Kernel deals with the hardware interaction. These service management systems deal with the running of software on top of the kernel. These are so important that if you’d close this process system, the entire system would crash.

With Linux, there are two service management systems which are Sysinit and systemd, namely.

Sysint is the good, old guy who’s been around for a long time. His birth dates back to the good, old 80’s when pure Unix, Slackware systems were present. Don’t get me wrong. Slackware is still there but the last release was actually in 2016. The last version is the SysVinit (you gotta pronounce it like System-Five-init).
Systemd is the new kid in the block. Actually ,he’s prevalent from the year 2010. systemd does things way better, faster than sysinit but there are some gotchas to systemd as well.

I hope you understood how services and applications are managed in Linux. In the next blogpost, let’s take a look at how these two systems manage things in their own way.

Till then, be happy and keep learning. See ya!

Top comments (0)