Can I change the (long, long) UUID of a USB flash drive to something short?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I change the (long, long) UUID of a USB flash drive to something short?
I prefer to work in the CLI as much as practical, and a long name for a drive is cumbersome. Is there a way to replace the UUID of a USB thumb drive? Maybe something like an alias for a bash command?? Yes, I've tried things that seemed likely, but no joy. TIA!
Thanks; I had wondered about that approach, so I'll run some trials. There is some concern about what happens when I replace one USB drive with another; ideally, I'd like to be able to rename each drive so it identifies itself by that new name, no matter which computer it's plugged into. Failing that, an alias that works only on my box would be adequate.
Edit: No progress. I have three USB thumb drives, and all three are recognized by their factory-origin "names". Those names have nothing to do with the /etc/fstab (as far as I have been able to determine). When I put each one in and mount it, the mount command shows that /dev/sdb1 is /run/media/user/(name). To belabor the point: whichever flash drive is plugged in, as soon as it is mounted, it becomes /dev/sdb1, and is recognized and works perfectly as long as I use its name. Two of the three thumb drives have short names; the newest has a name that is 36 characters long. I typically copy files in the CLI, and I'd like to carry on with that procedure -- but the command is unwieldy with the new thumb drive, as it must include the drive name.
Last edited by Zwergele; 11-09-2013 at 04:47 PM.
Reason: More information: /etc/fstab appears to be irrelevant
I prefer to work in the CLI as much as practical, and a long name for a drive is cumbersome. Is there a way to replace the UUID of a USB thumb drive? Maybe something like an alias for a bash command?? Yes, I've tried things that seemed likely, but no joy. TIA!
You can always try giving the filesystem a label, then mount it via a mount label=... option.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.