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

Chad ccolumbu at gmail.com
Tue Jun 23 13:16:39 PDT 2015


On 6/23/2015 1:01 PM, Reindl Harald wrote:
>
>
> Am 23.06.2015 um 21:45 schrieb Chad:
>> 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.
>
> maybe you should just install CentOS inside a VM and test it
>
> [root at srv-rhsoft:~]$ systemctl restart h
> halt-local.service               haveged.service home.mount                       hostapd-guest.service
> httpd-lounge-worker.service      hybrid-sleep.target
> halt.target                      hibernate.target hostapd-guest-interface.service  hostapd.service httpd.service
>
>
>> 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?
>
> as like for any other software - hit the TAB key
>
>> #####
>> 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
>
> nobody but you installs systemd-units in /etc/ and so you have only one location AND customized ones - with sysvinit you
> had no way to override /etc/init.d/httpd without doing the work after each update again
>

Harald,
Thank you for your reply and time.

I will make some time at some point to install CentOS 7 again, I just don't have one installed right now.

#1 I did not know you could tab complete that way! i.e. as part of a command argument, not just as part of a path.
Guess I learned something new after 20 years :)

#2 I can see the advantages of having a local override just like /usr/bin has /usr/local/bin.
Out of curiosity is there a reason the team did not follow the local pattern with something like: /lib/systemd/local/system?
It is easy enough to create an alias on systems I use often, it will just take time to learn/memorize the new paths, I 
am so used to /etc/init.d.

^C


More information about the systemd-devel mailing list