Google News
logo
Linux - Interview Questions
How do you mount and unmount filesystems in Linux?
In this case, you can use the ‘mount’ and ‘umount’ commands.

For mounting :

* First, identify the partition through the fdisk -l command. You can also use the lsblk command for it.
* After identifying the partition, create the directory which will work as the mount point. For example, running the mkdir /mnt/mountpnt will create the mountpnt directory as the mount point.
* Finally, you can run sudo mount <partition> <mount_point_directory> to complete the mounting.


For Unmounting :

* Once you check if the specific filesystem is in use, you can run the `sudo umount <mount_point_directory>` for unmounting. If you want to learn more about the mount command in Linux
Advertisement