2

I’m sure this question has been asked a million and one times already. I saw a video the other day about accessing all lost passwords and usernames through terminal nnd my question is are you able to clear that data at all? So there is no previous history of those account even existing? All of this is far out of my knowledge area so sorry for sounding like a noob.

TIA

  • You haven't said what data you want to 'hide'. You can clear screen via clear, you can remove command history by removing details in ~/.bash_history (though if you add spaces before your command, entries may not even reach that file, and file may vary on shell you use etc), etc... The details kept will dictate on system profile/security, eg. the 'space' bit I mentioned may be disabled anyway for remote run commands or all commands... Your question as written is vague or too broad.. – guiverc Jun 18 '20 at 05:59
  • So you want to delete the user and all evidence that the user ever existed? – Stephen Boston Jun 18 '20 at 07:07
  • Does this help? https://www.cyberciti.biz/faq/clear-the-shell-history-in-ubuntu-linux/, and https://askubuntu.com/questions/191999/how-to-clear-bash-history-completely – Ollie Jun 18 '20 at 13:12
  • My apologies. As i said this is completely new to me. So lets say a few years back i made accounts on some websites and i found a video recently that you were able to retrieve those passwords and account names with very little effort through what may have been terminal or maybe linux? I'm unsure. I just want to make sure that those passwords/ usernames are completely removed and have no evidence of them ever being used on this device. I appreciate all of your responses!! – Colesbrandbags Jun 20 '20 at 01:07

1 Answers1

1
cat /dev/null > ~/.bash_history && history -c && exit

This will help you to clear history of terminal, even if history saved in the history file as well as the history in the current session.

However, if you need to do it with a bit of secure way, I would suggest using following method.

shred -u ~/.bash_history && touch ~/.bash_history