Back in the days of “service servicename stop” you could then press up arrow to get last command, and your cursor is right on the “stop”, so you could press backspace 4 times and type “start”... now I have to left arrow through the service name to change the operator... this seemslike an inefficient change.

Am I just doing a “get off my lawn you kids!”? Am I missing a new trick? (besides using the “restart” operator... 🙄 there are times when you don’t want immediate restart.)

  • The question title does not match the manual for the command, which contains an ellipsis.
    – JdeBP
    Feb 25 '20 at 17:22
  • @JdeBP yes of course. I’m just using generic terms so search engines don’t think this is specific to NetworkManager.service or some other service.
    – MicDunDee
    Feb 25 '20 at 17:55
  • @MicDunDee Ellipses in the synopsis of a command has a very specific meaning. It means, in this case, that there may be any number of NAME arguments. So the command just takes the action, e.g. stop, from the first argument and applies to the rest of the arguments. This is simpler than going through the list of arguments and picking out the last argument as the action.
    – Kusalananda
    Feb 25 '20 at 18:02
  • @Kusalananda hmmm... thanks for pointing that out... I guess I see your point if this was a command that had high throughput like sed (versus grep). But in this case I think the usability aspect should win over “performance”... right?
    – MicDunDee
    Feb 26 '20 at 21:15
  • @MicDunDee It's simplifying the implementation of the command line parsing somewhat. It's not a matter of performance. I'm assuming it's also due to the construct command subcommand arguments being in much more frequent use (e.g. with git) than command arguments subcommand.
    – Kusalananda
    Feb 26 '20 at 21:31

General format (see systemctl(1)) is:

systemctl [options...] command [service...]

I.e., (optional) options (one or more!), a command and (optional) services (again, one or more; details depend on the command, not every one accepts none). So you can e.g. start several services with one command.

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.