mount

Mount Cheatsheet #

The mount command is used to attach filesystems to the directory tree in Unix-like operating systems.

Basic Commands #

Command/OptionExampleDescription
mount <device> <mount_point>mount /dev/sda1 /mntMount the device to the specified mount point
mount -t <type> <device> <mount_point>mount -t ext4 /dev/sda1 /mntSpecify the filesystem type when mounting
mount -o <options> <device> <mount_point>mount -o ro /dev/sda1 /mntMount with specific options (e.g., read-only)

Common Options #

OptionExampleDescription
-t <type>-t ext4Specify the filesystem type (e.g., ext4, ntfs, vfat)
-o <options>-o rw,noexecSpecify mount options (e.g., rw for read-write, noexec to disallow execution)
-amount -aMount all filesystems mentioned in /etc/fstab
-rmount -r /dev/sda1 /mntMount the filesystem as read-only
-vmount -vVerbose mode; show detailed information

Unmounting Filesystems #

Command/OptionExampleDescription
umount <mount_point>umount /mntUnmount the filesystem from the specified mount point
umount -aumount -aUnmount all filesystems mentioned in /etc/mtab

Checking Mounts #

Command/OptionExampleDescription
mountmountDisplay all currently mounted filesystems
`mountgrep ``mount

Troubleshooting #

Command/OptionExampleDescription
`dmesgtail``dmesg

This cheatsheet provides fundamental mount commands for attaching and managing filesystems on Unix-like operating systems.

mount

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.