Linux - Mounting File Systems (CDROM, NFS, SMB, …)


All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree. Conversely, the umount command will detach it again.

In order to access any file system, it is first necessary to mount it. By mounting a file system, you direct Red Hat Linux to make:

available to the system. (To know more, see this article: Linux - Adding storage depends of LVM).

In order to mount any file system, two pieces of information must be specified:

  • A device file name representing the desired disk drive and partition or the logical volume
  • A directory under which the mounted file system will be made available (otherwise known as a mount point)

How to

Create a Mount Point

When you want to create a mount point to map a drive in Linux, a folder must be always created first.

mkdir /myMountFolder/MyMountPoint

When you create the directory with the root user, it will become a system-wide location.

See What is Mounted

In addition to mounting and unmounting disk space, it is possible to see what is mounted. There are several different ways of doing this:

  • Viewing /etc/mtab
  • Viewing /proc/mounts
  • Issuing the df command

Mount File Systems Automatically

Unmount / umount

umount /mountPointDir/

Documentation / Reference

Powered by ComboStrap