To mount a disk partition using the LABEL on a Linux system, you will need to use the -L
option with the mount
command.
For example, to mount a partition with the LABEL data
to the /mnt/data
directory, you can use the following command:
sudo mount -L data /mnt/dataSourcwww:e.lautturi.com
This will mount the partition with the LABEL data
to the /mnt/data
directory.
To make the mount persistent across reboots, you will need to add an entry to the /etc/fstab
file. Open the /etc/fstab
file in a text editor and add the following line:
LABEL=data /mnt/data auto defaults 0 0
This will tell the system to mount the partition with the LABEL data
to the /mnt/data
directory at boot time.
Keep in mind that you will need to have root privileges (or be a member of the sudo
group) in order to mount and unmount partitions.
You can use the blkid
command to list the LABELs of all partitions on your system:
blkid
This will output a list of all partitions and their LABELs, as well as other information such as the UUID and filesystem type.