Systemd: service command not foundWhat can you do when the system answers to your commands with something like
That happened to me today.
% sudo service postgresql stop zsh: command not found: service
At glance, I thought there was some hidden problem with the
sudo(1), but a quick search on the web shown me that, for some strange reasons, Fedora has a specific package named
service, so the command what effectively not installed on the system.
The solution was therefore as simple as:
but why is a such important component not available on the base install?
% sudo yum install initscripts
I know that it is possible to interact with
systemctlin a straight manner, so for instance the following are equivalent:
but having to manage a lot of different system, I tend to rely on
% sudo systemctl stop postgresql % sudo service postgresql stop
servicebe there and do the right thing depending on the service manager the operating system is using.