in linux, how do I remove one line from my history?

in linux, how do I remove one line from my history?

I typed my password and it kept it.
Ryman1Asked:
Who is Participating?
 
jml948Connect With a Mentor Commented:
do the following:

history

then see what # is next to the line u want to erase

then do history -d #

then type history to verify its gone
0
 
omarfaridConnect With a Mentor Commented:
if you use bash, then in your home dir there is a file with the name .bash_history you can edit this file with vi and delete the line you don't want
0
All Courses

From novice to tech pro — start learning today.