On my Arch systemd install, the name of the root mount unit is -.mount. (It is not listed in /etc/fstab, rather, it get the details of the root mount for the kernel options specified in the boot manager.)If I try run any systemctl command on this unit, e.g:systemctl show -.mountI get this error: systemctl: invalid option -- '.'It is confusing the unit name for a option argument. How do I do this? Is there some why to escape the name so that it is not confused for a option argument?
How do I run systemctl command on root mount
systemd
By commonly used rules of specifying command-line parameters, a dash in front of an argument makes it interpreted as a short option.More precisely, -.mount is interpreted as 6 consecutive options, equivalent to: -. -m -o -u -n -t.To avoid this, place two dashes (--) in front of an argument:systemctl show -- -.mountThis will ignore any option parsing in the remainder of the command line.