To access the filesystem of an SSD, HDD, or USB drive in a Linux system, it needs to be mounted. This process allows you to access the data on the external drive and manage it within your system.
Since there may be multiple drives connected to your system, including internal and external ones, it’s important to determine the default name and path of the drive you want to mount first. This article provides several methods for mounting a drive in a Linux system.
- Mount Drive in Linux
- Mount Drive in Linux via GUI
- Mount Drive in Linux via Command-line Terminal
To mount a drive isn’t a difficult task in a Linux system, it depends on a few steps that must be done carefully. Linux offers two approaches that help to mount a filesystem from a drive and leave the choice to its users to pick any of them.
Method 1: If you want to mount a drive in the Linux system (Ubuntu) using a GUI method, the way is quite simple.
Open the Disks utility by typing Disks in the Activities search box and clicking the appeared Disks icon:
You will get attached drives in the left panel of the Disks tool, select the one you need to mount on the Ubuntu system. Once you select, all the drive data will be displayed in front of you:
You will see a play button that shows the drive is unmounted, click on it to mount the drive:
When you click on the play button, it will start mounting, as you can see in the screenshot given below:
You will see a stop (square) button when the filesystem is mounted successfully; it will also display the directory where the drive is mounted:
To customize the mount settings, click the gear icon and click on Edit Mount Options from the context menu:
In the Mount Options window, there are different options to modify the default settings, these options are concerned with the following:
- If you want to mount at every boot, check the “Mount at system startup” option.
- To make the drive accessible for the file explorer and other GUI interfaces, check the “Show in user interface” option.
- You can also edit the Mount Point if the default point seems difficult; just make sure the directory you set is present in the system.
Once you have done with the mount settings, click the OK button to save changes:
This modification requires user authentication, type the Linux system password, and click the Authenticate button:
If you want to unmount the drive, click the stop (square) button:
Method 2: Open your default file explorer and find the connected external hard drive to mount it:
Select it to mount it completely and make the filesystem accessible in the Ubuntu system:
You can also unmount it by clicking on the ejecting icon displayed next to drives icon:
The terminal is another approach through which you can mount the drive and access the filesystem.
For this, execute the lsblk command to list all the internal and external drives. You will find the external drive’s name as /dev/sdb, /dev/sdb1, or /dev/sdb 2 etc., depending upon the number of connected drives:
Now make a new mount point by creating a directory using the mkdir command where you can mount the drive’s data; let’s name it “drive_mount”:
In the next step, you are required to mount the drive in the newly created directory, the mentioned syntax will be used:
Suppose, to move the filesystem from the drive sdb1 to the mount_drive directory, the command would be:
Run the ls command to check if the drive sdb1 is successfully mounted on the newly created mount point drive_mount:
To unmount the drive from the directory, execute the given command:
Mounting a drive is necessary when you need to access its filesystem within your machine. This isn’t a complex task as we just need to do a few steps but with concentration. To mount a drive, we need to find its default name and further proceed with the function in the above-mentioned ways.
This guide has mentioned numerous ways to mount a drive; these approaches include GUI and command-line interface. In GUI, we have further two methods to access the filesystem by mounting them in the Ubuntu system.