How To Mount A Partition In Linux

Table of contents:

How To Mount A Partition In Linux
How To Mount A Partition In Linux

Video: How To Mount A Partition In Linux

Video: How To Mount A Partition In Linux
Video: Adding New Mount Point fdisk Demonstration Linux 2024, December
Anonim

Any linux user has come across the term "partition mounting" in one way or another. each media and disk is mounted to the system in a specific format. However, quite often the system cannot automatically detect the type of file system and media. In this case, you have to mount the partition yourself.

How to mount a partition in Linux
How to mount a partition in Linux

Instructions

Step 1

Linux provides the user with a specific external interface for working directly with the mounted device. A file named media is created in the / dev directory of the system. Partition mounting is needed in order to "explain" to the system how to get to certain data. This is done using three parameters:

- file system type, - desired device name, - mount point.

Step 2

The mount point is the directory from which the file system of the advertised device will be accessed. In order to mount a device in linux, use the "mount" command. For example, to attach a device with the fat file system to / dev / hda5, the command “mount –t fat / dev / hda5 / mnt / storage” will be used at / mnt / storage.

Step 3

If the partition has to be mounted frequently, then you can specify the instruction in the / etc / fstab file, which is responsible for attaching partitions to the file system. To edit it, it must be opened with superuser rights using any text editor.

The fstab itself is written in columns, where the first column is responsible for the partition being mounted, the second for the mount point, the third for the file system type, and the fourth for additional parameters, in the form of encoding. The Dump and Pass columns are usually 0. Press Tab after each column.

Step 4

After working with the device, it should be unmounted. For this, the system has a command "umount".

For example, to unmount the / mnt / storage partition, enter:

"Umount / mnt / storage".

In order to find out the list of available devices for connection, you can use the command

"Fdisk –l".

Recommended: