If the name part of the service to stop is misspelled, systemctl outputs no error message and exits with code 0, just as everything would be Ok. bash-4.2# systemctl stop nosuchthing.service bash-4.2# echo $? 0 Note that other commands like start or status do output an error message and set a non-zero exit code. The stop command also output an error message and set non-zero exit code if the extension part of the service name is misspelled. Would be nice to get the same behavior also when name part of the service name is misspelled.
This is fixed in recent systemd versions, please test!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.