Remove the history of commands in GNU/Linux shell

Image

For most of the linux users history of commands in shell is a grace. Up/Down arrow
keys help them to find the previously executed commands.But for someothers it may
be a curse.There are situations in which you don’t need to reveal previously used
commands in linux terminal, especially when your system is being used by others.

Linux provides an easy method for removing the history of used commands. Keep it
safe and simple by editing the .bashrc. It is hidden by default in the home folder.

1. Open .bashrc in shell by nano .bashrc
2. Move to the line where
HISTSIZE=10
HISTFILESIZE=200
is written.
3. Edit the numbers to look like
HISTSIZE=0
HISTFILESIZE=0
4. Now you can logout and check the changes made
by pressing the Up/Down arrow keys.

Advertisements

One thought on “Remove the history of commands in GNU/Linux shell

  1. Pingback: Remove the history of commands in Linux shell | Linux Howto: Noob Edition.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s