DEV Community

Cover image for Quick copy-paste device UUID to various Linux configurations in console
Paweł bbkr Pabian
Paweł bbkr Pabian

Posted on

Quick copy-paste device UUID to various Linux configurations in console

Device UUIDs are commonly used when configuring /etc/fstab mount points, when setting up bootloaders like systemd-boot and for many administrative tasks. Those identifiers are painful to deal with if you are logged to console without copy-paste capabilities. So here is quick way to inject them into configs:

Open file in nano editor:

nano /etc/fstab
Enter fullscreen mode Exit fullscreen mode

Navigate to point where you want to insert UUID, press Control+T and write command:

blkid --match-tag UUID --output value /dev/enter_your_device_name_here
Enter fullscreen mode Exit fullscreen mode

Press Enter and it will insert UUID at your cursor. F2 to save file and done.

Top comments (0)