Re:Systemd: The Good Parts
by teddyfrozevelt on Sunday May 16, 2021 @03:56PM
(#27176509)
Fair. I think it's because systemd lets you use slashes in unit names, but you can't represent those as files so you have to use a dash instead. This is the worst for the root filesystem mounted at / since that's the entire name. In systemd's defense, it warns you when you try systemctl status the normal way.
I found my mount names by running systemctl list-units, so it's not something I had to look up.
[ Parent
| on HN ]
You can use systemd-escape(1) to have it generate the correct unit name for you, e.g.:
systemctl status $(systemd-escape --path /home --suffix mount)
Yeah, complicated and verbose, but reliable and integrates into systemd mindset very well.