Manually mounting a USB to linux via command-line
It’s been quite a hectic week, and this post will be a short one. Never the less, this may actually be something you may not know how to do. This is one of those skills that is so simple that if you don’t do it every day, you find yourself looking it up over and over again. So let’s dig right in. We’re going to be looking at how to mount a USB device to a linux computer via command-line.
Insert The USB and Locate it
You’re going to run the following command:
sudo fdisk -l
note: fdisk is a command line partition tool that allows you to create, edit, and mangage partitions on the drives.
Once you run the command, you will likely see a few different devices and partitions, but the one that you should focus on will most likely present itself as /dev/sdb1.
Create the mounting point
Now run the command below to create the directory you want to mount the USB to.
sudo mkdir /media/USB
Mount the USB
Now that you’ve created the mounting point, you can attach the usb to it with this command:
sudo mount /dev/sdb1 /media/usb
Once you’re done using the device, you can safely unmount it with this command:
sudo umount /dev/sdb1
Thanks for reading. Until next time!