0

How to delete all executed commands in SSH?

Asked 3 years ago (May 12, 2021) in the field of Operating Systems by Elias2020

Hello. Thank you for helping me. Can I clear the executed commands in SSH? How?

SSH

Answers


0
Answered 3 years ago (May 14, 2021) by Eldernode Staff

To clear the history of executed commands in SSH, run:

> /root/.bash_history

Or

\cp /dev/null /root/.bash_history

Please note that previous commands can be displayed until you exit! Also, the commands you executed during your last login will not be deleted.
If you wish to disable it completely, type:

rm -rf /root/.bash_history
ln -s /dev/null /root/.bash_history

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day