2025-03-14 21:59:59 -06:00
|
|
|
# systemd-mount
|
|
|
|
|
|
|
|
|
|
> Establish and destroy transient mount or auto-mount points.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemd-mount.html>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Mount a filesystem (image or block device) at `/run/media/system/LABEL` where LABEL is the filesystem label or the device name if there is no label:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`systemd-mount {{path/to/file_or_device}}`
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Mount a filesystem (image or block device) at a specific location:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`systemd-mount {{path/to/file_or_device}} {{path/to/mount_point}}`
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- List all local, known block devices with filesystems that may be mounted:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`systemd-mount --list`
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Create an automount point that mounts the actual filesystem at the time of first access:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`systemd-mount --automount yes {{path/to/file_or_device}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Unmount one or more devices:
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`systemd-mount {{[-u|--umount]}} {{path/to/mount_point_or_device1 path/to/mount_point_or_device2 ...}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Mount a filesystem (image or block device) with a specific filesystem type:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`systemd-mount {{[-t|--type]}} {{file_system_type}} {{path/to/file_or_device}} {{path/to/mount_point}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Mount a filesystem (image or block device) with additional mount options:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`systemd-mount {{[-o|--options]}} {{mount_options}} {{path/to/file_or_device}} {{path/to/mount_point}}`
|