Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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 must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .