Open In App

File System Mounting in OS

Last Updated : 11 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we are going to discuss the most important concept in Operating Systems which allows the users to organize and access files from different storage devices. If we compare it to a real-life scenario, it is closely related to “Connecting puzzles to get a complete picture of data”.

What is File System Mounting?

Mounting is a process in which the operating system adds the directories and files from a storage device to the user’s computer file system. The file system is attached to an empty directory, by adding so the system user can access the data that is available inside the storage device through the system file manager. Storage systems can be internal hard disks, external hard disks, USB flash drivers, SSD cards, memory cards, network-attached storage devices, CDs and DVDs, remote file systems, or anything else.

Terminologies used in File System Mounting

  • File System: It is the method used by the operating system to manage data storage in a storage device. So, a user can access and organize the directories and files in an efficient manner.
  • Device name: It is a name/identifier given to a storage partition. In windows, for example, “D:” in windows.
  • Mount point: It is an empty directory in which we are adding the file system during the process of mounting.

Mounting Indifferent Operating Systems

1. Linux-Unix based OS

We want to mount /dev/sdb1 to an existing directory /mnt.

sudo mount /dev/sdb1 /mnt/mydisk

After mounting, we have to unmount after use

sudo umount /mnt/mydisk
before and after Mounting

before and after mounting

2. Windows OS

In windows mounting is very easy for a user. When we connect the external storage devices, windows automatically detect the file system and mount it to the drive letter. Drive letter may be D: or E:.

Steps:

  • Connect an external storage device to your PC.
  • Windows detects the file system on the drive (e.g., FAT32 or NTFS) and assigns it a drive letter, such as “E:”.
  • You can access the derive by going through, THIS PC –> FILE EXPLORER –>”E:” drive
  • Access the data.

3. Mac OS

In Mac OS when we connect an external storage it will automatically mount, and it will be accessible via Finder. As an advanced mounting method user can also use the command diskutil in Terminal.

Method 1:

Steps:

  • Connect an external storage device to your MAC.
  • MS OS detects the file system and automatically mount it.
  • You can access the drive by opening Finder, and it will appear in the sidebar.

Method 2(Using diskutil):

To mount a drive with a known identifier: disk2s1

diskutil mount /dev/disk2s1

To unmount:

diskutil unmount /dev/disk2s1

FAQs on File System Mounting

Q.1: What is file system mounting in an operating system?

Answer:

The process of associating a storage device with a directory in the file system

Q.2: What is the primary purpose of file system mounting?

Answer:

To make files and directories accessible to users

Q.3: In Linux, which file contains information about file systems that should be automatically mounted at boot time?

Answer:

/etc/fstab


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads