bash で以前実行したコマンドを ↑ キーや Ctrl+p、Ctrl+r で検索すると思います。 このとき、 以前実行したコマンドの引数を一部変えて実行したいから history からコマンドを探して一部だけ書き換えようと思っていたのに間違えて Enter を押してそのまま実行してしまった ↑ キーや Ctrl+p で履歴を辿っている途中に間違ったコマンドを実行してしまった などのオペレーションミスをしたことがある方、いらっしゃると思います(ローカル環境とリモート環境を行ったり来たりしているとミスしがちな気がします)。 history を保存しないようにすれば(set +o history など)上記のようなオペレーションミスは防げそうですが、コマンドの履歴が見られないのは不便です。 そこで、history からコマンドを実行できなくしつつ、コマンドの履歴は見られるようにする設定を検証し