我最近安装了cryptsetup。我已经和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.但是,当我尝试使用该命令时,它不会识别它。
bash: cryptsetup: command not found然后,我尝试使用which查找命令的位置。which cryptsetup
但是,该命令不返回任何内容。man cryptsetup说cryptsetup确实是正确的命令名。这里怎么了?
发布于 2022-12-16 09:44:42
cryptsetup安装在/sbin中,默认情况下它不在用户的PATH上;因此,which找不到它。
如果您以根用户身份运行which,它应该会找到cryptsetup:
$ which cryptsetup
cryptsetup not found
$ sudo which cryptsetup
/sbin/cryptsetup(关于which,请参阅为什么不用“哪个”呢?那该用什么呢?)
https://unix.stackexchange.com/questions/728670
复制相似问题