昔はサービス再起動は service restart httpd のようにしていたが、いつのまにか sudo systemctl restart httpd という風に変わっていたので、いつ変わったのか AI に聞いてみた。
The change from the service command to systemctl in Linux occurred with the adoption of systemd as the default init system, replacing the older SysVinit system.
Timeline of Change:
- Systemd Introduction:
systemdwas first introduced in 2010 by Lennart Poettering and Kay Sievers as an alternative to SysVinit. - Adoption in Major Distributions:
- Fedora became the first major Linux distribution to adopt
systemdas its default init system in Fedora 15 (released in May 2011). - Debian switched to
systemdas the default init system starting with Debian 8 (Jessie), released in April 2015. - Ubuntu started using
systemdas the default init system with Ubuntu 15.04 (released in April 2015).
- Fedora became the first major Linux distribution to adopt
Why the Change?
The change to systemctl was made to take advantage of the features and improvements that systemd brings over the older SysVinit system, including:
- Parallel service startup (faster boot times).
- More powerful service management with
systemctl. - Better tracking and logging with
journalctl. - Better handling of dependencies between services.
While service was part of the older SysVinit system, systemctl is part of the systemd system and is now the recommended tool for managing services on most modern Linux distributions.
Compatibility:
- In many distributions that have switched to
systemd, theservicecommand is still available as a wrapper aroundsystemctlfor backward compatibility. However, usingsystemctldirectly is the preferred method now.
参考:https://koanacademy.jp/initd_systemd
No comments:
Post a Comment