How to Create Mount Point in CentOS 7
The method for creating a new mount point on CentOS 7 is as follows:
- Create a directory for mounting point:
- Create a new directory at the specified mount point using superuser privileges.
- Among them,
is the name of the mount point you want. - Find the identifier of the device or file system to be mounted by using one of the following commands:
- lsblk: displays disk and partition layout.
- fdisk -l: displays disk and partition information.
- blkid: displays the UUID and label of devices or file systems.
- Mount a device or file system to a mount point.
- Elevate the mount command to connect the specified device to the designated mount point.
- “Or”
- Mount the specified UUID to the designated mount point.
- Among them,
is the identifier of a device or file system, and is the UUID of a device or file system. - To verify if the mounting was successful, use one of the following commands to check if the device or filesystem has been successfully mounted to the mount point:
- df -h: Displays the mounted file systems.
- Mount: displays devices or filesystems that are already mounted.
- (Optional) Configure automatic mounting:
To automatically mount devices or file systems during system startup, please edit the /etc/fstab file and add the following line: - /dev/
is mounted at /mnt/ with the specified and default settings, both set to 0. - Or
- UUID=
mounted at /mnt/ using with default settings. - Among them,
is the type of file system. - Save the file and exit the editor.
- Restart the system or manually execute the following command to apply the changes.
- – Run the command “sudo mount -a”
By doing this, you are creating a new mounting point and attaching a device or file system to it.