How to Mount a USB Drive in Debian Linux

Most Linux distributions are configured to automatically mount USB devices as soon as they are inserted into the USB ports. The system itself mounts the USB drives to a directory under /media folder and you can access them using your File Manager. However, in some cases, you are still required to mount the USB drives manually in order to access them.


In this article, we will discuss how to mount a USB drive in a Debian OS in case it is not detected by the system automatically.

How to Mount

Howto Clear Bash History in Linux

Sometime you need to clear bash history for some reason like privacy or something else. Clearing bash history is pretty simple just run this command in your linux terminal

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
history -c
history -c
history -c

Or

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
rm ~/.bash_history
rm ~/.bash_history
rm ~/.bash_history

Prevent Saving History

You can add the command to your ~/.bash_logout so that history will get cleared everytime you logout from terminal

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo 'history -c' >> ~/.bash_logout
echo 'history -c' >> ~/.bash_logout
echo 'history -c' >> ~/.bash_logout

Finding Max History Can Be Stored

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo $HISTSIZE
1000
echo $HISTSIZE 1000
echo $HISTSIZE
1000

My history stored in ~/.bash_history file can hold up to 1000 last commands