github twitter
Linux fstab: Automount Drive using UUID
Feb 19, 2015
One minute read

Finding the UUID

The UUID (Universally Unique Identifier) for all disks on the system can be found using:

ls -l /dev/disk/by-uuid

screenshot

Editing fstab

The fstab file is typically found in /etc/fstab.

If the UUID for disk you want to mount is 4aefa6e1-f473-455e-9baf-fcfdd97cc7e6, then fstab can be updated by adding something similar to what’s shown below (for a simple ext4 partition with default settings):

#mounting data drive
UUID=4aefa6e1-f473-455e-9baf-fcfdd97cc7e6 /path/to/mount/point ext4 defaults 0 0

 Resources


Back to posts


comments powered by Disqus