Monday, June 18, 2018

Linux CLI USB Mounting

To mount a USB device in the command line in Linux, you will need to know what the device is called.  There are many ways to fetch this information if you don't have it already.
lsusb
blkid
fdisk -l
udiskctl
I typically just use the top one, and the bottom one doesn't work on all systems. Once you have the name of the device, then you will need to decide where to mount it. One potential location is shown below.
/mnt
With the location, you can then mount your USB storage device.
mount /dev/sdj1 /mnt
When done, you can unmount it just as easily.
umount /mnt

That pretty much covers it.

No comments: