Jason Bosco

Full Stack Web Developer ; Generalist

Bash History -d Command

I often find myself typing passwords into the bash shell in a hurry before I can type the command which is going to ask for the password! This text gets into the bash history which really embarassing. To remove an item from the bash history, type 

history

to view the items in the history along with the offset. Now type

history -d offset

where offset is the one specified in the output of the previous command.