How to Auto-Mount a Volume by editing FSTAB (File Systems Table) in Linux

Subscribers:
144
Published on ● Video Link: https://www.youtube.com/watch?v=SmuU9eOlgBo



Category:
Guide
Duration: 5:15
25,926 views
76


Here I show you how to mount a volume automatically each time you login. You will need root permissions to do so, but it is fairly simple.

First, locate where the drive is listed in your system by issuing:

sudo fdisk -l
(Be careful with the fdisk command, improper use can wipe entire partitions).

Then you need to select a mount point. It can be any directory you want, but it needs to be empty. If it is not, you will not be able to get the previously placed files until you unmount the volume.

Finally, editing the File System Table:

sudo gedit /etc/fstab
(Of course, you can use other editors, such as nano, vi, emacs, kate, etc).

You then need to write in the changes, using the locating given by fdisk, the previously selected mount point, the file system type (ext4, ntfs, reiserfs, etc.), options (rw, user, exec, auto, etc.), and optionally Dump & FSCK bits.

Upon reboot (or issuing a mnt command in the terminal) your drive will be mounted.







Tags:
Linux
volume
partition
hard
solid-state
drive
/etc/fstab
File
Systems
Table
FSTAB