2

I want to change the volume label of a FAT usb with fatlabel but when I try to run the command in terminal it does not recognize it.

root@debian:/home/a# fatlabel --help
bash: fatlabel: command not found

So I tried installing dosfstools which is the package that contains fatlabel. However it is already installed.

root@debian:/home/a# apt-get install dosfstools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dosfstools is already the newest version (4.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Both man fatlabel and the online manpage https://manpages.debian.org/bullseye/dosfstools/fatlabel.8.en.html clearly state that fatlabel is the right name to use to invoke the command. How can I restore the command?

1 Answer 1

1

The command is in /sbin, so presumably your PATH doesn’t include that directory (which would happen if you changed to root using su for example).

The quick fix is to give its full path:

/sbin/fatlabel --help

You can find where a given package’s commands are installed using dpkg -L:

dpkg -L dosfstools | grep bin/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .