Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 3123  / 2 Years ago, wed, august 31, 2022, 11:57:32

I want to change the name of my partition so that I can change the directory from the terminal using the changed name. The current path to the partition is /mnt/8C5442D35442C026 which is long and I cannot remember it. I tried to change the path using GParted, also tried renaming the partition (or rather its bookmark) but to no avail.



How can I achieve it? I am running Ubuntu 18.10 along with Windows 10. I want to be able to use that drive/partition on Windows as well.



Edit:



The output of cat /etc/fstab is



# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=e8118874-6565-45c7-bab4-67ee65476e60 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
/dev/disk/by-uuid/8C5442D35442C026 /mnt/8C5442D35442C026 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/3C5234155233D1FE /mnt/3C5234155233D1FE auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/7A7E1A557E1A0B11 /mnt/7A7E1A557E1A0B11 auto nosuid,nodev,nofail,x-gvfs-show 0 0

More From » gparted

 Answers
7

You don't need to change the label, only the mountpoint. First, run sudo nano /etc/fstab and change this line:



/dev/disk/by-uuid/8C5442D35442C026 /mnt/8C5442D35442C026 auto nosuid,nodev,nofail,x-gvfs-show 0 0


To this:



/dev/disk/by-uuid/8C5442D35442C026 /mnt/myDisk auto nosuid,nodev,nofail,x-gvfs-show 0 0


Of course, you can change myDisk to whatever name you want. Then, create the directory:



sudo mkdir /mnt/myDisk


Next, either reboot or just unmount the partition and mount it again:



sudo umount /mnt/8C5442D35442C026
sudo mount /mnt/myDisk





Alternatively, you could always simply create a symlink pointing to the existing mountpoint:



ln -s /mnt/8C5442D35442C026 $HOME/myDisk


Now, you have the directory $HOME/myDisk and you can use that instead of /mnt/8C5442D35442C026.


[#5991] Thursday, September 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
torlim

Total Points: 408
Total Questions: 113
Total Answers: 110

Location: Estonia
Member since Wed, May 27, 2020
4 Years ago
;