Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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