Which bash command shows the volume label?
2 Answers
/sbin/blkid /dev/sdXY # needs rootpriv for internal drives
ls -l /dev/disk/by-label/ | grep sdXY # workaround for unprivileged users
To display the label for the currently mounted partition at /
use:
lsblk -o LABEL,MOUNTPOINT | grep " /$" | cut -d' ' -f1
Added benefit no sudo
required.