How to manually mount/unmount USB devices on Ubuntu
When you connect a USB drive to your system, it is usually automatically mounted and a folder with your username is created in the media folder. You can also access the drive through your system's file manager. Unfortunately, this is not always the case; sometimes you need to manually mount the USB drive to your system to access it.
This guide will explain how to manually mount and unmount a USB drive to your system. The commands and steps described in this article will work on all recent versions of Ubuntu including Ubuntu 24.04 and Ubuntu 22.04 .
How to mount USB on Ubuntu
Follow these steps to manually mount the USB to your system:
Step 1 : Plug the USB into an available port.
Step 2 : Run the following command as sudo in the Terminal application to check the available storage devices on the system and the file system they are using:
$ sudo fdisk -l
Your USB device will usually be listed at the end of the output, usually as sdb-(number) . In the example case, it is listed as sdb1 , running the FAT32 file system .
Step 3 : Create a mount point for your USB device using the following command:
Syntax:
$ sudo mkdir /media/[mountPointName]
Note : Your mount point name cannot include spaces; you can separate words with underscores '_'.
For example:
$ sudo mkdir /media/USB
The mount point will be created now.
Step 4 : Now, we will mount the USB storage device to the created mount point. We will use the following command to mount the FAT32 device:
$ sudo mount -t vfat /dev/sdb1 /media/USB -o [securityoption]
The security option is required and allows you to grant/receive access to the USB by specifying one of the following values to grant permission:
- uid=1000
- gid=1000
- Utf8
- dmask=027
- fmask=137
This example grants access control to a user (current user) by specifying the user id:
For NTFS, use the following command:
$ sudo mount -t ntfs-3g /dev/sdb1 /media/USB
Step 5 : The USB is now mounted. You can access it through your media folder.
You can also access the USB through the file manager. In the following image, the 16 GB Volume listed just above Other Locations is the mounted USB storage device.
How to unmount USB on Ubuntu
If you have mounted the USB manually, it is best to also unmount it manually.
Step 1 : Use the following command to unmount USB:
$ sudo umount /dev/sdb1
Or:
$ sudo umount /media/USB
In the above command, specify the mount point if it is different from the 'USB' mount point used.
The USB will be unmounted from your system:
Step 2 : You will need to manually delete the USB mount point folder as follows if you do not plan to use it again in the future:
Step 3 : Remove USB from the system.
After following the steps described in this article, you should be able to successfully mount and unmount USB storage devices in and out of your system. This will help if your system does not automatically allow USB access and use.
You should read it
- What's New in Ubuntu 21.10?
- How to Remove a TV from a Mount
- How to Install Themes in Ubuntu
- Why is Ubuntu LTS preferred over regular distros?
- What's new in Ubuntu 18.04 LTS just released?
- Sony Unveils 8K Burano Digital Camera with Anamorphic Mount
- How to Install Ubuntu Tweak 0.5.1 in Ubuntu
- How to prolong the life of Ubuntu 18.04 installation with Ubuntu Pro
May be interested
- Ubuntu gives PCs and smartphones a flat interfacecanonical has been trying for years to turn ubuntu into a popular operating system for a variety of devices of different sizes, be it tvs, computers or even smartphones.
- 5 Reasons Ubuntu Cinnamon Is Better Than Other Ubuntu Versionsubuntu cinnamon became an official ubuntu release in 2023. it gives you ubuntu but with the cinnamon desktop environment instead of gnome.
- How to Fix Bluetooth Connection Problems in Ubuntuif you're using bluetooth devices on your computer, you may have noticed that you need to reconnect your bluetooth devices whenever your computer wakes up from sleep or hibernation. and that is a matter of concern.
- 7 reasons to upgrade to Ubuntu 23.04canonical released the final version of ubuntu 23.04, called lunar lobster, in april 2023. this version of ubuntu offers quite a few changes and updates that many will surely appreciate.
- Ubuntu 19.10: Roadmap for release & planned featuresubuntu 19.04 disco dingo has been officially released for several months and now is probably the right time to spend some time discussing the upcoming ubuntu 19.10 'eoan ermine'.
- Tips and tricks after installing Ubuntuubuntu is one of the completely free open source operating systems. this is a distribution (distro) of linux with the second highest amount of traffic after linux mint.
- What is Ubuntu? Why should you use Ubuntu to replace Windows?what is ubuntu? why should you use ubuntu to replace windows? currently, ubuntu is much more popular than before and is strongly developed. in this article, the software tips will help you learn about ubuntu and why ubuntu should be used instead of windows.
- How to run Ubuntu 18.04 or 18.10 on Raspberry Piraspberry pi and ubuntu seem like an ideal combination, but don't have an official standard ubuntu image for single-board computers.
- How to Install Ubuntu 13.10ubuntu is a kind of linux operating system designed to run on desktop and laptop computers. ubuntu is an open-source program, meaning its code can be accessed and modified by end users. and because it's free, ubuntu is said to be the most...
- How to configure static IP address on Ubuntu 22.04 LTS and 22.10the ip addresses of most devices today are generated by the dynamic host configuration protocol (dhcp) server. the dhcp server dynamically assigns an ip address to your device when it is connected to the network. therefore, you have the opportunity to change this ip address from time to time.