"which"コマンドが実際にインストールされていても見つかりません

最近インストールして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

その後、findコマンドを使用して場所を確認しましたwhichwhich cryptsetup

ただし、このコマンドは何も返しません。これが実際に正しいコマンド名であるとman cryptsetup言います。cryptsetupここに問題がありますか?

ベストアンサー1

cryptsetupその結果、デフォルトの/sbinユーザーではなくインストールされました。PATHwhich

rootとして実行したら、次のものを見つける必要がありwhichますcryptsetup

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

(詳しくはwhich下記をご覧ください。「which」を使わないのはなぜですか?それでは何を使うべきですか?)

おすすめ記事