HowTo: Linux Remove a Partition Name (/dev/sdXY entry) Temporarily

www.lautt‮moc.iru‬
HowTo: Linux Remove a Partition Name (/dev/sdXY entry) Temporarily

To remove a partition name temporarily on a Linux system, you can use the umount command to unmount the partition and remove the corresponding device entry from the /dev directory.

To unmount a partition and remove its device entry, you can use the following syntax:

$ umount -l /path/to/partition

Replace /path/to/partition with the path to the partition that you want to unmount. The -l option tells the umount command to "lazy unmount" the partition, which means that the partition will be unmounted, but any processes that are accessing the partition will be allowed to continue.

Note that this will only remove the partition name temporarily. The partition name will be re-added to the /dev directory when the partition is mounted again.

You can also use the losetup command to remove the device entry for a partition without unmounting it. To do this, you can use the following syntax:

$ losetup -d /dev/loopX

Replace /dev/loopX with the name of the device entry that you want to remove. This will remove the device entry without unmounting the partition.

These are just a few examples of how to remove a partition name temporarily on a Linux system. The specific steps may vary depending on the distribution and version of Linux that you are using. You can refer to the documentation for the umount and losetup commands for more information on how to use them.

Created Time:2017-10-29 22:08:44  Author:lautturi