I see that there is a systemd service called dhcpcd5 and an init.d script called dhcpcd. Why both ways? What are the differences and how to choose which run?


Most popular distribution have changed its init system from old SysV to systemd including Debian and its flavor Raspbian. Scripts in /etc/init.d/ are leftover from SysV and they are all emulated by systemd. I think they are only available for backward compatibility of old scripts, or the maintainer of the programs still doesn't have realized that "init world" has changed and that init.d scripts will disappear more and more.

If asking what to use then you should only use systemd because that's what makes all jobs.

  • In fact DO NOTHING, because dhcpcd runs by default.
    – Milliways
    Aug 19 '19 at 0:50
  • @ingo, newbie me don't know nothing of "dhcpcd" and never heard of "SysV". Is it related to a very old thing called "UNIX V"? Just now I goggled the following cheat sheet to get a very vague idea: "SysVinit Vs Systemd Cheatsheet":2daygeek.com/…. I often hear the experts talking about dhcpd in access points discussions. I have zero experience in using access points, not to mention building them. Anyway, I guess I need to scan the dhcpcd related posts in this forum to pull up a little bit my low reputation. :)
    – tlfong01
    Aug 19 '19 at 3:43
  • @Milliways: I don't like the default behavior, so I'm going to change it. For this reason I needed to understand why there are both SysV and systemd services.
    – Mark
    Aug 19 '19 at 6:12
  • 1
    @Mark If you don't like dhcpcd then you may consider to use systemd-networkd. Look at three different networking systems on Raspbian and Howto migrate from networking to systemd-networkd with dynamic failover.
    – Ingo
    Aug 19 '19 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.