Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Right now, I'm aware that for all commands typed into the console, the Ubuntu system logs it somewhere.

How can I disable logging of unix commands for all users?

share|improve this question
1  
It would be helpful for future readers to understand why someone might wish to remove command histories. By way of counterpoint, users frequently retype the same or similar commands and can avail themselves of the ctrl-r, up arrow, or bang mechanisms. –  dmourati Oct 3 '12 at 18:09

2 Answers 2

You can easely erase your current user command history using

history -c

useful if you typed a password as a commnad parameter.

share|improve this answer

Try putting this in your /etc/profile:

unset HISTFILE

This only works for shells which evaluate the systemwide profile like bash and sh, see bash manual. Not sure about other shells. Also, users need to logout and login again to make it work.

share|improve this answer
    
@Shi unfortunately I can't approve your suggested edit, so I have to do it manually. –  Alexander Janssen Oct 3 '12 at 17:38
    
Funny. I couldn't approve it in the notifications, because I don't have enough points, but I was able to do it when I clicked on edit. –  Alexander Janssen Oct 3 '12 at 17:40

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.