I use Putty to access my dedicated servers trough SSH. When i click up arrow couple times i can see commands that i put in yesterday or at previous session. Do they stay locally or on server side? How can i clear this list or previous commands? So next time if someone else logs in he won't see what i was doing.


You can simply remove this file for now. And to prevent it being saved next time, you could put unset HISTFILE into your .bash_profile. A bit more drastic is ln -sf /dev/null .bash_history. You'll still have command history during your sessions, but the file isn't saved anymore.


The history is kept in (most likely) a file in your home directory, ~/.bash_history, which is on the server you connect to. Other users shouldn't have access to your .bash_history, and you can just clear the content of that to clear out the history.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.