tldr/pages/common/mount.md

29 lines
705 B
Markdown
Raw Permalink Normal View History

# mount
> Provides access to an entire filesystem in one directory.
> More information: <https://manned.org/mount.8>.
- Show all mounted filesystems:
`mount`
- Mount a device to a directory:
`mount -t {{filesystem_type}} {{path/to/device_file}} {{path/to/target_directory}}`
- Mount a CD-ROM device (with the filetype ISO9660) to `/cdrom` (readonly):
2014-02-27 21:02:50 +00:00
`mount -t {{iso9660}} -o ro {{/dev/cdrom}} {{/cdrom}}`
- Mount all the filesystem defined in `/etc/fstab`:
`mount -a`
- Mount a specific filesystem described in `/etc/fstab` (e.g. `/dev/sda1 /my_drive ext2 defaults 0 2`):
2014-02-27 21:02:50 +00:00
`mount {{/my_drive}}`
2019-08-21 17:52:14 +01:00
- Mount a directory to another directory:
`mount --bind {{path/to/old_dir}} {{path/to/new_dir}}`