Linux command
systemd-mount 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Mount
systemd-mount [path/to/device]
Mount
systemd-mount [path/to/device] [path/to/mount_point]
List
systemd-mount --list
Create
systemd-mount --automount yes [path/to/device]
Unmount
systemd-mount -u [path/to/mount_point]
Mount
systemd-mount -t [filesystem_type] [path/to/device] [path/to/mount_point]
Mount
systemd-mount -o [mount_options] [path/to/device] [path/to/mount_point]
说明
systemd-mount creates and destroys transient mount or automount points using systemd's mount handling. It creates temporary mount units that are automatically cleaned up when unmounted. The tool integrates with systemd's device and mount management, supporting features like automount (on-demand mounting) and proper tracking of mount states through systemd units.
参数
- --list
- List known block devices with mountable filesystems
- --automount _bool_
- Create an automount point
- -u, --umount
- Unmount the specified mount point or device
- -t, --type _fstype_
- Specify filesystem type
- -o, --options _opts_
- Mount options
- --owner _user_
- Set the owner of the mount point
- -A, --automount
- Create automount unit
- --discover
- Use automatic device discovery
FAQ
What is the systemd-mount command used for?
systemd-mount creates and destroys transient mount or automount points using systemd's mount handling. It creates temporary mount units that are automatically cleaned up when unmounted. The tool integrates with systemd's device and mount management, supporting features like automount (on-demand mounting) and proper tracking of mount states through systemd units.
How do I run a basic systemd-mount example?
Run `systemd-mount [path/to/device]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --list do in systemd-mount?
List known block devices with mountable filesystems