How to manage system services on Linux

There are currently 3 main init systems used by Linux. A few years ago, there was just one, SysVinit, but it’s been deprecated in most distros by now. Currently, most distros are switching to systemd, for example, Debian Jessie. The most notable distribution using systemd are Fedora, CentOS, RedHat, OpenSuse, Ubuntu, Mint.

I will briefly introduce the whole thing.

Print active services in human-readable form.

# systemctl list-units -t service

Print active services without legend/headers.

# systemctl list-units -t service --no-legend

Print statıus of single service.

# systemctl status cron

Check if the service is active.

# systemctl is-active cron

Enable as a startup service.

# systemctl enable cron

Disable a sartup service.

# systemctl disable cron

Start s service.

# systemctl start cron

Stop a service.

# systemctl stop cron

Reload service’s configuration.

# systemctl reload cron

Restart a service.

# systemctl restart cron

Restart a service if it’s running.

# systemctl try-restart cron

--

--

--

DevOps & Software & Architect & Linux Geek — http://baturorkun.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

E-Virtual platform explained

Cross Chain Authentication and the Future with InvArch.

SOLID Networking: The Single Responsibility Principle

Continuous deployment of Create React App projects (or any other static UI) to AWS S3, using…

Pandas: easy way to compute duration

Why micro front-ends are the way forward in modernizing application user interfaces

Google Summer of Code with SCoRe Lab | First Evaluation Summary

7 Best Free Jira Alternatives To Try In 2020

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Batur Orkun

Batur Orkun

DevOps & Software & Architect & Linux Geek — http://baturorkun.com

More from Medium

How to install Chocolatey in windows- DevOps Champ

How to create a Base (secure) Configuration for a Cisco Switch.

Pentester’s Guide to Performing File Transfers

Git commands to contribute to openSource