HOME BLOG

How to Access USB Stick from Terminal on Ubuntu

Posted on: April 14th, 2018 by Olu No Comments

In this article I go over how to access a USB stick from the terminal on Ubuntu.

 

1. Find what the drive is called
You’ll need to know what the drive is called to mount it. To do that run one of the following commands:

lsblk
sudo blkid
sudo fdisk -l

 

You’re looking for a partition that should look something like: /dev/sdb1. Find it and remember what it’s called.

 

2. Create a mount point (optional)
This needs to be mounted into the filesystem somewhere. You can usually use /mnt/ if you’re being lazy and it isn’t already used, otherwise create a new directory using a command like:

sudo  mkdir /media/usb

 

3. Mount device

sudo mount /dev/sdb1 /media/usb

 

4. Unmount device
When you’re done using the device, run the following command:

sudo umount /media/usb

 

References

1. command line – How to access a usb flash drive from the terminal? – Ask Ubuntu. https://askubuntu.com/questions/37767/how-to-access-a-usb-flash-drive-from-the-terminal

Comments are closed.