6 ms·
Perhaps you're trying to make a point, but the command should work with /usr/sbin/service or prefaced by sudo. If you run `whereis service` you can see that the
by hyper_reality 6y ago
Perhaps you're trying to make a point, but the command should work with /usr/sbin/service or prefaced by sudo. If you run `whereis service` you can see that the binary is located in /usr/sbin (at least on Debian/Ubuntu systems) which is typically placed in the PATH of root but not normal users. However --status-all doesn't require elevated permissions so the command works if you provide the full path.
- xeeeeeeeeeeenu 6y agoSome distributions, for example Slackware, don't have it at all.
- nemetroid 6y agoA bit of both. My computer does not have the "service" command at all. While it's true that many systems still do, it's typically there as a legacy compatibility layer, to translate SysV style commands to systemd. So while the command might work for many readers, I don't think it's a good idea to send beginners that way, and its inclusion (without any footnotes or other qualifications) suggests that the author's knowledge is out of date.