Achievement unlocked: accessing a USB disk via terminal!
Accessing a flash drive from terminal seems like it ought to be simple, but it’s varying degrees of a pain on different OS’s. It also seems like something I should have learned ages ago–especially considering that when I first started terminal-ing, Allison Kaptur’s advice to me was to quit Finder cold-turkey until I could do everything I wanted to do via terminal. Anyway, for anyone who’s a little confused by this, it’s actually pretty easy.
Look for your disk in
/Volumes/[diskname]. A bit obscure, but actually super simple!
More of a pain. You have to create a directory in which to ‘mount’ the drive. Then you can work with the content of your drive through that directory, and when you’re done, just unmount. This set of instructions was found on Ask Ubuntu.
- Find what the disk is called using
sudo fdisk -l. (Probably something like
- Create director in
sudo mkdir /media/usb
- Mount it:
sudo mount /dev/sdb1 /media/usb. Your drive now lives in
- When you’re done, unmount:
sudo umount /media/usb(Note that the command is
unmount. This one had me scratching my head for way longer than it should have.)