View/change UUID in Linux

This may seem obvious, but you can view/change uuids with tune2fs

This is a fact I’ve stumbled upon quite a bit, but when trying to remember it, it slipped my mind and googling for ‘view uuid’ sort of came up fruitless, so I thought I’d post it here.  I knew it was one of the common commands I use quite a bit, so after manning hdparm (yeah, again, it seems obviously not that in retrospect) I tried tune2fs, which is where I’ve seen the option before.

tune2fs -l /dev/hda1

will let you see the uuid of /dev/hda1

The -U flag will let you set it.  Of course, you can then mount by uuid, which is a lot of times better because hey, device names change.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s