Copied to clipboard

mount

`mount` command is used to attach a filesystem to a specified directory for access.

Examples

1. Mount filesystem

Mount the filesystem of device dev/sdb to the directory /mnt:

mount /dev/sdb /mnt

2. Specify filesystem type

Mount the filesystem of type ext4 to the directory /mnt:

mount -t ext4 /dev/sdb /mnt

3. Specify mount options

Mount filesystem in read-only mode with ro option:

mount -o ro /dev/sdb /mnt

4. Force the execution of mount operation

Force the execution of the mount operation even if the filesystem is already mounted:

mount -f /dev/sdb /mnt

5. Cancel specific error handling behavior

Cancel all error handling behaviors in the filesystem:

mount -E /dev/sdb /mnt

6. Specify filesystem type and mount options

Specify ext4 filesystem type and mount in read-only mode:

mount -t ext4 -o ro /dev/sdb /mnt