Mount usb drive on raspberry

Posted on December 9, 2019

Plug In the USB drive

Create amount point

sudo mkdir /media/usb
sudo chown -R pi:pi /media/usb

Manually mount the device

sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi

Unmount the drive

sudo umount /media/usb

 

Auto mount (follow the link below for more information)

ls -l /dev/disk/by-uuid/

Find the UUID of the drive and add it in fstab file

sudo nano /etc/fstab
UUID= /media/usb vfat auto,nofail,noatime,users,rw,uid=pi,gid=pi 0 0

Use CTRL-X and y to save and exit the nano editor.

 

Source: https://www.raspberrypi-spy.co.uk/2014/05/how-to-mount-a-usb-flash-disk-on-the-raspberry-pi/