I did a small research before making the question,but I couldn't find an answer.My question is how can I change the uuid (universally unique identifier) of a hard drive disk.I am asking this because every time I want to access a hard drive from terminal I have to find these random uuid which the system has generated automatically which are quite long.Also,I want to know the dangers of making this kind of change.
You can change a partition UUID or label, how to do so is dependent on the file system.
For changing the label see
For changing the uuid, you can use
Change "/dev/sdb1" to the device you wish to change the uuid on.
You almost certainly will need to update
If you add a label to your partition using a tool like gparted, parted, etc. your disk will show up as /media/mydisklabel instead of /media/somerandomhex-digits-38characters
If you're in the terminal you could also do something like:
to set a variable and instead of using
The only way I know of to change a UUID is to re-format the disk, but it will just result in a different 38-character UUID, so it doesn't solve the problem.
You can change the LABELS of the hard drives but when doing so they will have to be unmounted. If you are booted into the system then it is not able to be revised. Recommend using Gparted Live CD because it will do the job an not regress the installed system.