Linux Training : 11. mount

mount

mount is used to attach a device to the filesystem for use.

mount usage

The general form is mount -t <type> <dev source> <mount location>.
Just running the mount command with no arguments will show what is currently mounted.

  • A particularly useful option is the -o loopback option.
    This allows a CD or DVD image file to be mounted and read as if it were burned to disk and mounted from a physical optical drive.
    This is also how to read the contents of squashfs files and initrd files with additional filesystem type flags.

mount data

  • Data about what is currently mounted is kept in /etc/mtab and /proc/mounts.
  • The file that controls system mounts is /etc/fstab.
  • User mountable devices such as CDROM and USB thumbdrives are not listed in /etc/fstab. They are automatically by the udev process in the kernel.
mount exercise
  1. What, if anything, will not be automatically mounted on boot up and how can you tell?
  2. If the thumbdrive is not automounted, a quick dmesg shows it's device /dev/sdd1. Show the mount command that would make it available to a non-root user when mounted at /media/thumbdrive