The USB device is mounted automatically by the system operating system when attached to the USB port. We can access the USB from the file manager of that particular machine. But sometimes, this doesn’t happen due to complications like missing configurations for USB storage devices and the system causing failure to mount the USB devices. Then, in these types of cases, we have to manually mount the USB devices in our systems to access them. Here, we will configure the manual way to mount the USB device on our system. All the commands and instructions are utilized for Ubuntu 22.04 LTS.
Detect USB in Ubuntu 22.04
Before mounting the USB in Ubuntu 22.04, we have to figure out whether the USB is plugged into the USB port. When we plugged the USB into the USB port, the new USB icon is automatically displayed in the Ubuntu 22.04 dock as shown in the following screenshot. Moreover, we can find the attached USB inside the file manager of Ubuntu 22.04. Our USB name is “MyUSB” which is found in the file manager as the folder.
If in case the plugged USB is not found in the dock or file manager, we have a “Disks” application in Ubuntu 22.04. From the activities, we search for this application and launch it. The following image shows the appearance of the “Disks” application.
Here, we have our plugged drive of 16GB size. We format the USB to remove any issue or troubleshoot that it creates in the system. After formatting, the USB drive will be displayed in Ubuntu 22.04 dock and file manager.
Mount the USB in Ubuntu 22.04 from the Terminal
Now, in this section, we mount the USB with Ubuntu 22.04 shell command line. This enables us to mount a USB device to a mount point in our system with any existing file system. We first execute the command to identify the USB device in our system. The highlighted line in the following output shows our USB device location in Ubuntu 22.04. If this type of line is not found, it means that the USB file is not found in our system and we cannot access the files and folders of the drive.
We now establishe a new directory to get the data of the USB drive. Here, we create the “/media” directory with the mkdir command under the sudo authorization for a USB drive to be mounted. The USB name is also given to the “/media” directory.
The USB device is connected to the Ubuntu 22.04 file system so we can easily access the data that is present in it. We can also deploy the utility program of the mount to do the same. Now, we run the “mount” command to read the manual for further usage.
Next, we run the command to mount the USB drive that has the FAT16 and FAT32 file systems.
If the previous steps are followed accurately for the USB drive to mount in Ubuntu 22.04, only we can access the USB drive content. Now, we run the “lsblk” command again to check the status of the USB drive that we mounted. Hence, the USB is mounted in the new “media” directory successfully.
All the previous commands are for mounting the USB drive in Ubuntu 22.04. We can also unmount the mounted USB using the following command. We use the mount point directory with the unmount command. This command removes the mount USB drive.
To see whether the USB is unmounted or not, we utilize the “lsblk” command again which displays that no USB is currently mounted in Ubuntu 22.04.
Mount the USB in Ubuntu 22.04 from the Disks Application
We accomplished in mounting the USB drive with the Ubuntu 22.04 shell command line. It is also fairly simple to mount the drive with the desktop environment of Ubuntu 22.04. We have many Linux operating systems that currently have GUI programs for the same. But here, we will follow the instructions to mount the USB flash drive with Ubuntu 22.04 GUI. As we discussed earlier, the disk application locates the USB drive in Ubuntu 22.04. When we click our USB drive option, the details of our USB drive are opened. In the “volumes” section in the following illustration, we have the “contents” option. The “contents” display that the USB drive is not mounted.
Now, to enable the “Mount” status for the USB drive, we press the play button as shown in the previous image. By doing this, the USB drive is automatically created at the mount point and is attached to the device. Now, the status of our USB drive is mounted in the directory as displayed in the following screenshot:
Next, we open the USB drive by right-clicking the previously-mounted directory. There, we have an option to open the link. The link directs us to the USB drive location. The figure shows the location of our USB drive in Ubuntu 22.04.
The mounting step for the USB drive is very simple to the Ubuntu 22.04 GUI. Likewise, the unmount method is also very simple. We just have to click the square button which is displayed when we mount our USB. The status of the USB drive is now unmounted as the following snapshot displays it:
Conclusion
Here, we learned to mount the USB in the latest version of Ubuntu 22.4 so that we can easily access the USB stored data to read and add the new content to the USB. The Linux operating system enables us to either set up a temporary mount for a USB drive that we plug in or a persistent mount for a flash drive that we don’t intend to erase. Here, we used two ways to mount the USB drive: using the shell command line of Ubuntu 22.04 where we mount the USB drive with the mount command. Moreover, we used the unmount command to unmount the mounted USB. Then, we mounted and unmounted the USB drive with the GUI application Disks of Ubuntu 22.04.