5

I have recently installed the cryptsetup. I've double checked with sudo apt-get install cryptsetup.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cryptsetup is already the newest version (2:2.3.7-1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

However when I try to use the command it does not recognize it.

bash: cryptsetup: command not found

Then I tried to find the location of the command using which. which cryptsetup

However the command does not return anything. man cryptsetup says that cryptsetup indeed is the right command name. What is wrong here?

1 Answer 1

15

cryptsetup is installed in /sbin, which isn’t on users’ PATH by default; as a result, which can’t find it.

If you run which as root, it should find cryptsetup:

$ which cryptsetup
cryptsetup not found
$ sudo which cryptsetup
/sbin/cryptsetup

(Regarding which, see Why not use "which"? What to use then?)

1
  • Instead of generically not using which, for the particular case where you've installed a package on a Debian system, run dpkg-query -L cryptsetup (or whatever). It'll list the files installed by the package. There are of course equivalents for other package managers. Commented Dec 18, 2022 at 2:32

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.