Description of problem: Systemctl accepts most unit names on the command-line. However, there are two failure cases: $ systemctl status -.mount systemctl: invalid option -- '.' $ systemctl status -.slice systemctl: invalid option -- '.' The workaround is to interpose "--" in those two cases. Thus: $ systemctl status -- -.mount ● -.mount - Root Mount ... Version-Release number of selected component (if applicable): systemd-239-6.git9f3aed1.fc29.x86_64 How reproducible: Always. Steps to Reproduce: 1. See above. Actual results: See above. Expected results: Systemctl recognizes root unit names on the command-line and handles them like any other unit name. Additional info: AFAICT, "-.mount" and "-.slice" are the only two cases: $ systemctl list-units --all | fgrep -- '-.' -.mount loaded active mounted Root Mount -.slice loaded active active Root Slice "-.mount" and "-.slice" are documented in SYSTEMD.SPECIAL(7).
https://github.com/systemd/systemd/pull/11065
(In reply to Zbigniew Jędrzejewski-Szmek from comment #1) > https://github.com/systemd/systemd/pull/11065 Thanks, although the message blames the user for using a *valid* systemd unit name: log_notice("Hint: invalid to specify units starting with a dash, use \"--\":\n" Nicer to say: "Hint: use \"--\" before units starting with a dash, ..."
It's better to comment on github, since almost nobody looks here. This was a just a copy&paste error from the previous line. I'll push a new version.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3) > It's better to comment on github, since almost nobody looks here. > This was a just a copy&paste error from the previous line. I'll push a new > version. Thanks: "Hint: to specify units starting with a dash, use \"--\":\n" ... https://github.com/systemd/systemd/compare/f55dbf808f6735ff7ea232a70869fe95498824e6..7a5165f45e0224d8280a3c928ed30bc000f9384c
This will be available in F30. Possibly also in F29 if systemd is upgraded to 241 there, but this is not certain yet.