[systemd-devel] How to get used to systemd vs init

Chad ccolumbu at gmail.com
Tue Jun 23 12:45:52 PDT 2015

I am sure this is the wrong place to send this e-mail, but I could not find another place to send it.
I want to learn and use systemd, but have run into a few problems on my way.
Please don't see this as an attack on systemd, I want to learn something new, but change is hard.

I am an old school kind of sysadmin and I am planning on moving from CentOS 6 to CentOS 7, but I am having trouble with 
systemd. I am hoping you know some shortcuts/tricks to help me learn the new way.

1. I can't spell. With init I don't have to know how to spell things because I have tab complete. I use tab complete for 
almost every command I type. For example:
/e<tab> gets -> /etc/
/etc/in<tab>  gets -> /etc/init
/etc/init.<tab>  gets -> /etc/init.d/
/etc/init.d/ht<tab gets -> /etc/init.d/httpd
/etc/init.d/httpd restart
So I entered 19 characters and got 25 with tab complete.

The new systemd way would be to type (23 total characters, no tab complete):
systemctl restart httpd
Maybe I could tab complete systemctl, but I don't currently have a CentOS 7 system to test on.

The real issue is that I have to know (in the above example) that it is httpd not http.
With so many systems, distros, and services it is hard to remember every service name exactly (and some names are very 
long). For example ntpd has a d, but nfs does not.
Tab completion fixes this issue for me.

How can I use tab completion with systemd?

2. How to find all possible services:

The init way:
ls -l /etc/init/d

The systemd way:
ls -l /lib/systemd/system/*.service /etc/systemd/system/*.service

This seems WAY harder and I have to remember 2 locations instead of 1.

3. List all services and their start levels:

The init way (all services):
chkconfig --list

The init way (only active services. I use this a lot):
chkconfig --list | grep :on

The systemd way (all services):
systemctl list-unit-files --type=service

The systemd way (only active services, I don't know how to do this).
systemctl ???

4. What about the many programs that rely on /etc/init.d/<service> status/start/stop/restart
I have many services that are monitored by nagios or cron jobs (like logrotate) that rely on /etc/init.d/<service> 
I don't want to change them because right now they work on every server and I don't want to have to maintain 2 versions 
of the code or hunt them all down.
Is there some trick/3rd party script to create /etc/init.d wrappers/scripts to make all the services work with the old path?
Something like:
ln -s /lib/systemd/system/<service>.service /etc/init.d/<service>
Or maybe a shell script like:
service=`basename "$0"`
systemctl $1 $service

So I would like to move forward with systemd (and will eventually have to if I want modern/supported OSs), but systemd 
seems harder to deal with and will break a lot of my existing scripts/cronjobs/monitors.

Thank you all for your work on FOSS, you are making the world a better place!!


Chad Columbus
20 years of application development and sysadmin
Currently maintaining about 30 CentOS 6 servers.
Have maintained over 1,000 linux servers over the years.

More information about the systemd-devel mailing list