Is your USB drive not exhibiting in your Linux system? Are you unable to entry your exterior disk drive? By mounting your USB drive to the Linux filesystem, you possibly can resolve this situation. On this article, let’s take a look at how one can mount and unmount the USB flash drives or exterior exhausting disks in Linux.
This text will undergo each command line and graphical person interface (GUI) strategies. The previous methodology for mounting a USB drive works on all Linux distributions. Nonetheless, should you’re a newbie and use Ubuntu or Ubuntu-based distributions, you possibly can mount utilizing the GUI software.
Why Is USB Not Detected In Linux?
When you plug in your USB system (aka USB sticks, thumb drives, and Pendrive) for the primary time, Linux often mounts it mechanically. However typically, Linux fails to acknowledge and mount a USB drive to its filesystem. This is the reason you discover the USB not exhibiting on the Linux working system.
Linux filesystem follows a tree listing construction with all information and folders hooked up to a single root listing. So, if you wish to entry and use exterior storage units, first, you need to mount it to the Linux filesystem.
To mount a USB drive in Linux utilizing a terminal, comply with the step-by-step directions given beneath. When you’re utilizing Ubuntu Linux and aren’t acquainted with the command line, skip the primary methodology to the subsequent one and mount and unmount the USB drive utilizing the Ubuntu GUI software.
How To Mount USB Drive In Linux Utilizing Command Line
1. Detect Plugged In USB System
When you plug in your USB system to your system USB port, run the next command to find the USB system:
sudo lsblk
Now you possibly can see the detected USB system named ‘sdb.’ Your system identify might differ from mine, so you will discover the system identify matching its dimension.
You can even discover that the system ‘sdb’ has no mount level right here. When you additionally discover the identical, it means the USB drive shouldn’t be mounted to the Linux system. Therefore, you possibly can’t entry your drive information and folders.
2. Create a Mount Level
To entry the USB drive information, we’ve to create a listing that can act as a mount level within the Linux filesystem. Right here, I’m creating a brand new listing at ‘/media’, the place we’ll mount the system later.
sudo mkdir /media/pendrive
Nonetheless, making a listing to mount and entry a drive is an elective step; you too can instantly connect it to the ‘/media’ listing.
3. Mount USB Drive To Mount Level
We’re now able to hyperlink the USB system to the Linux filesystem and entry its information. We’ll use the ‘mount’ utility program to do the identical. If you wish to find out about ‘mount,’ learn its handbook utilizing:
man mount
In case your USB disk drive has a FAT16 or FAT32 file system, you possibly can mount the system by working the command:
sudo mount /dev/sdb /media/pendrive
Change ‘sdb’ together with your system identify.
Most USB flash drives use FAT16 or FAT32, whereas some exterior exhausting disks use NTFS. If in case you have a file system apart from FAT, use a flag to specify file system sort like ntfs-3g for NTFS.
sudo mount -t ntfs-3g /dev/sdb /media/pendrive
4. Examine For The System Mounted
If all goes effectively with the earlier steps, now you can entry your USB drive file and folders. You possibly can test the standing of the system utilizing the identical ‘lsblk’ command:
sudo lsblk
As you possibly can see, the USB drive ‘sdb’ now has a mount level which implies it’s mounted at that location. So, navigate to the listing (mount level) the place you possibly can entry your drive information.
cd /media/pendrive/
Unmount USB Drive In Linux Utilizing Command Line
Unmounting the USB system is only a one-line command utilizing ‘umount’:
sudo umount /media/pendrive
You possibly can see that the mount level has been eliminated, and you’ll once more not entry your USB drive.
Notice: Most Linux distros configure the settings to automount the identical USB drive to the system for future use. However should you’re once more unable to entry your USB system, you possibly can both carry out the identical steps or manually set the system to automount. You possibly can comply with our article on how one can automount partitions on boot.
How To Mount USB Drive On Ubuntu Utilizing GUI
Mounting an exterior drive or USB flash drive utilizing the GUI software is fairly easy. A number of Linux distros already provide GUI functions for a similar. Right here, I’ll information you to mount/unmount a USB drive on Ubuntu utilizing the GUI software.
1. Open Disks Utility
Open the Actions overview from the highest left nook and seek for the ‘Disks’ software.
Click on to open the app, and you’ll discover that it mechanically shows the ‘Not Mounted’ standing for related USB units.
2. Mount A USB System To Ubuntu Linux Filesystem
Simply click on on the play button to mount the USB drive, as identified within the image beneath. It should mechanically create a mount level and fix the system to it.
3. Examine For The Mounted System
The second you click on on the play button, you’ll discover a drive icon pop up in your dock.
When you click on on the icon, it would open the USB drive within the file supervisor, the place you possibly can entry all of your drive information.
You can even see the USB drive standing ‘Mounted’ with mount level location at ‘/media/<username>/<drive-name>’.
4. Unmount USB drive On Ubuntu
Lastly, click on on the identical play button to detach or unmount the USB drive from the Ubuntu Linux system.
So, that was how you would mount/unmount USB drives on Ubuntu and different distros utilizing the Terminal and GUI. If in case you have any questions or discover the information troublesome to comply with, tell us within the feedback part beneath.