I'm using screen command after ssh to a public remote machine with Ubuntu 14.04 so that I could continue my sessions whenever I want. I've found that some admins are tracking my command history and they have access to my screen sessions too. I know that I can clear my bash history commands by removing .bash_history file in my home directory but couldn't find a way to clear my screen sessions' command history too.
Asked
Active
Viewed 5,247 times
1
1 Answers
3
Command you are looking for is history
To delete your current session it would be
history -c
To delete your current session and previous ones you would use both commands
history -c && history -w

Ziazis
- 2,174
echo $0
orls -l /proc/$$/exe
to see what shell you're running then. – muru Nov 07 '17 at 07:06