Mount A USB Memory Stick / Drive

List available devices

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

SDA1 will be your USB memory stick (unless you have multiple).  What it means:

The SD means SCSI device which also incoporates USB drives.
The A means the 1st drive found (the next would be SDB, SDC, etc)
The 1 means the first partition of the device (multiple partitions will give SDA2, SDA3, etc)

Create a directory to assign it to and apply ownership of it

Note that "usb" can be anything you want,

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

Mount the USB Drive

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

You can now access your drive using the path /media/usb/

Un-mount the USB drive

sudo umount /media/usb

E.g. if you want to remove it before the RPi is powered down

 

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published.