How do I Mount and Unmount a File System in Linux? – Linux Hint

We all know that Linux-based systems are highly file dependent. These files are grouped into multiple filesystems, and to facilitate access to a particular filesystem, you can attach that filesystem to any location until you want to access it. When you’re done, you can simply disconnect this file system from that location. The whole process of attaching the filesystem to a specific location is called mount, while disconnecting the filesystem from a specific location is called unmounting.

In addition, the place where you mount the file system is officially called the mount point. There are several file systems available on the Linux operating system. Some of these filesystems are mounted by default, others are not, which means you can easily mount them yourself. In today’s article we will show you how to mount and unmount a filesystem in Linux Mint 20.

File system Installation method in Linux Mint 20

To install the file system in Linux Mint 20, follow these steps:

The lsblk command is used under Linux to display all mounted and unmounted file systems. Before we install the file system in Linux Mint 20, we want to list all the file systems with the lsblk command, as shown below:

When this command is executed, all filesystems, i.e. mounted and mountable filesystems, are displayed in a tree structure. In the following figure, you can recognize already mounted file systems by the fact that their mount points are marked in the figure. Other file systems, i.e. systems that do not have a mount point named after them, are available to mount.

We will now try to mount the file system in Linux Mint 20 by executing the mount command as shown below:

MountPoint file system name $ MountPoint

Here you need to replace NameOfFileSystem with the exact name of the file system you want to mount and MountPoint with the location where you want to mount the correct file system. Under Linux you can also not mount a file system without root privileges, and since we are not logged in as root, we used the sudo keyword for the mount command. Otherwise, this command would have generated an error message.

As in our case, we tried to mount the already installed file system, i.e. /dev/sda1, a message appeared on our terminal indicating that this file system is already mounted at the specified mount point, as shown in the following image. However, if we had chosen a filesystem that wasn’t mounted before, such as /dev/sda2, /dev/sda5, etc., our filesystem would be mounted at a specific mount point when the mount command was executed.

File system Termination method in Linux Mint 20

To unmount the file system in Linux Mint 20, you need to perform the following steps:

We will now try to unmount the same filesystem that we tried to mount with the above method. To do this, we need to execute the umount command in our terminal, as shown below:

Name of the $ file system

Here you must replace the NameOfFileSystem with the exact name of the file system you want to disconnect, in our case /dev/sda1, as shown in the figure below:

You can also use the umount command as follows:

Here you need to replace MountPoint with a location where you want to mount the file system, which in our case was /boot/efi, as shown in the figure below. If one of the above two commands gives an error message, it may also be due to a missing Sudo keyword. So, to be sure, you can try to execute these commands with the sudo keyword to grant root privileges when you unmount the file system.

When you execute one of these commands, the control is simply transferred to you without displaying an output on the terminal. As a user, you may wonder whether or not the file system you have specified is installed correctly. To check this, you can try running the lsblk command again. If the file system you specified no longer has a mount point in the results of this command, it means that our file system has been successfully mounted. In this example we wanted to mount the /dev/sda1 filesystem from the /boot/efi mount point. The following figure is used to check whether the file system /dev/sda1 has been successfully mounted because its mount points are no longer included in the results of the lsblk command, as shown in the following figure


In this article we investigated in detail how to mount and unmount a file system in Linux Mint 20. By following these methods, you can easily link any file system of your choice in any place and at any time when you want to access that file system or, more accurately, the files it contains. In the same way, you can also mount the file system of your choice at any time if you think you don’t need access to it anymore. Both methods are extremely simple and can be completed in minutes.

Related Tags:

write the output of time command,linux umount target is busy,linux umount device is busy,how to mount a hard drive in linux,unmount partition windows,unmount drive ubuntu,unmount usb linux command line,unmount drive linux,mount ext4 linux fstab,mount ext4 linux ubuntu,ubuntu 18.04 create mount point,unmount partition ubuntu,linux mount command nfs,linux mount fstab,mount command windows,unmount command not found,mount is not a block device,linux mount smb network share,how to unmount nfs share in linux,extend existing logical volumes,unmount network drive linux,linux mount nas drive,linux create network drive,umount device is busy nfs,umount2: device or resource busy,fusermount force unmount,error unmounting /dev/sda1 target is busy,mount iso linux ubuntu,furius iso mount,failed to setup loop device,mount iso manjaro,fedora 30 mount iso,mount img file ubuntu,linux force unmount sd card,ubuntu umount is busy,fuser cuk,unmount root filesystem,umount home test target is busy,sshfs umount failed: operation not permitted,umount target is busy,umount command linux,linux mount command,unmount linux,how to mount a partition in linux,unmount file system,unmount iso in linux,unmount sd card linux