Linux Filesystems and Mounts Cheat Sheet/Build a systemd unit name for a path

Convert a path into the corresponding systemd mount unit name.

Section: fstab and Boot-Time Mounts

Build a systemd unit name for a path

bash
bash
systemd-escape -p --suffix=mount /mnt/data
Explanation

Convert a path into the corresponding systemd mount unit name.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing fstab and Boot-Time Mounts
Edit fstab
Configure persistent mounts, swap, and mount options.
OpenIn sheetbashsame section
Show UUIDs for fstab entries
Collect UUIDs and labels for robust /etc/fstab entries.
OpenIn sheetbashsame section
Test all fstab entries
Validate /etc/fstab without rebooting.
OpenIn sheetbashsame section
Reload systemd units after fstab change
Useful when fstab is consumed into mount units.
OpenIn sheetbashsame section
Inspect generated mount units
See active mount units managed by systemd.
OpenIn sheetbashsame section
Show parsed fstab view
Render how the system interprets /etc/fstab.
OpenIn sheetbashsame section