Mount usb drive on raspberry

April 7, 2020

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.