How to erase Bash shell command history
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I'd like to clear recent inputs in terminal not cls or clear but when you press up or down. How do I clear this list so that when I rename sudo to nodood or something you cannot press up to view the new sudo perhaps my script will read input. I cannot ask multiple questions on this crappy site I must wait 90 minutes so I will just not use it anymore.
command-line bash
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
I'd like to clear recent inputs in terminal not cls or clear but when you press up or down. How do I clear this list so that when I rename sudo to nodood or something you cannot press up to view the new sudo perhaps my script will read input. I cannot ask multiple questions on this crappy site I must wait 90 minutes so I will just not use it anymore.
command-line bash
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap.
– Punkroku
51 mins ago
2
For complaints about the system use the meta site. For askubuntu that would be meta.askubuntu.com And it is of course an anti-spam measure. Please ONE question per topic. I answered the history part. The other one needs a separate question.
– Rinzwind
48 mins ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'd like to clear recent inputs in terminal not cls or clear but when you press up or down. How do I clear this list so that when I rename sudo to nodood or something you cannot press up to view the new sudo perhaps my script will read input. I cannot ask multiple questions on this crappy site I must wait 90 minutes so I will just not use it anymore.
command-line bash
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'd like to clear recent inputs in terminal not cls or clear but when you press up or down. How do I clear this list so that when I rename sudo to nodood or something you cannot press up to view the new sudo perhaps my script will read input. I cannot ask multiple questions on this crappy site I must wait 90 minutes so I will just not use it anymore.
command-line bash
command-line bash
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 31 mins ago
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 52 mins ago


Punkroku
63
63
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Punkroku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap.
– Punkroku
51 mins ago
2
For complaints about the system use the meta site. For askubuntu that would be meta.askubuntu.com And it is of course an anti-spam measure. Please ONE question per topic. I answered the history part. The other one needs a separate question.
– Rinzwind
48 mins ago
add a comment |Â
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap.
– Punkroku
51 mins ago
2
For complaints about the system use the meta site. For askubuntu that would be meta.askubuntu.com And it is of course an anti-spam measure. Please ONE question per topic. I answered the history part. The other one needs a separate question.
– Rinzwind
48 mins ago
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap.
– Punkroku
51 mins ago
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap.
– Punkroku
51 mins ago
2
2
For complaints about the system use the meta site. For askubuntu that would be meta.askubuntu.com And it is of course an anti-spam measure. Please ONE question per topic. I answered the history part. The other one needs a separate question.
– Rinzwind
48 mins ago
For complaints about the system use the meta site. For askubuntu that would be meta.askubuntu.com And it is of course an anti-spam measure. Please ONE question per topic. I answered the history part. The other one needs a separate question.
– Rinzwind
48 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
To clear your history use
history -c
+1 my friend! Also, if you don't wanthistory -c
in your history put a space in front of the command. =)
– Terrance
26 mins ago
add a comment |Â
up vote
0
down vote
Deleting history
If you want only to delete a single command (eg erroneous typed your password) type
history -d <line number>
In case you want to delete the entire history enter
history -c
History files can be found in your home directory. For bash this will be
.bash_history
and the temp files.bash_history-xxxxxx.tmp
. Hence deliting them would also work.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
To clear your history use
history -c
+1 my friend! Also, if you don't wanthistory -c
in your history put a space in front of the command. =)
– Terrance
26 mins ago
add a comment |Â
up vote
4
down vote
To clear your history use
history -c
+1 my friend! Also, if you don't wanthistory -c
in your history put a space in front of the command. =)
– Terrance
26 mins ago
add a comment |Â
up vote
4
down vote
up vote
4
down vote
To clear your history use
history -c
To clear your history use
history -c
answered 50 mins ago
Rinzwind
199k26381512
199k26381512
+1 my friend! Also, if you don't wanthistory -c
in your history put a space in front of the command. =)
– Terrance
26 mins ago
add a comment |Â
+1 my friend! Also, if you don't wanthistory -c
in your history put a space in front of the command. =)
– Terrance
26 mins ago
+1 my friend! Also, if you don't want
history -c
in your history put a space in front of the command. =)– Terrance
26 mins ago
+1 my friend! Also, if you don't want
history -c
in your history put a space in front of the command. =)– Terrance
26 mins ago
add a comment |Â
up vote
0
down vote
Deleting history
If you want only to delete a single command (eg erroneous typed your password) type
history -d <line number>
In case you want to delete the entire history enter
history -c
History files can be found in your home directory. For bash this will be
.bash_history
and the temp files.bash_history-xxxxxx.tmp
. Hence deliting them would also work.
add a comment |Â
up vote
0
down vote
Deleting history
If you want only to delete a single command (eg erroneous typed your password) type
history -d <line number>
In case you want to delete the entire history enter
history -c
History files can be found in your home directory. For bash this will be
.bash_history
and the temp files.bash_history-xxxxxx.tmp
. Hence deliting them would also work.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Deleting history
If you want only to delete a single command (eg erroneous typed your password) type
history -d <line number>
In case you want to delete the entire history enter
history -c
History files can be found in your home directory. For bash this will be
.bash_history
and the temp files.bash_history-xxxxxx.tmp
. Hence deliting them would also work.
Deleting history
If you want only to delete a single command (eg erroneous typed your password) type
history -d <line number>
In case you want to delete the entire history enter
history -c
History files can be found in your home directory. For bash this will be
.bash_history
and the temp files.bash_history-xxxxxx.tmp
. Hence deliting them would also work.
answered 14 mins ago


abu_bua
2,59751021
2,59751021
add a comment |Â
add a comment |Â
Punkroku is a new contributor. Be nice, and check out our Code of Conduct.
Punkroku is a new contributor. Be nice, and check out our Code of Conduct.
Punkroku is a new contributor. Be nice, and check out our Code of Conduct.
Punkroku is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1084898%2fhow-to-erase-bash-shell-command-history%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I cannot post on other sites like stackoverflow etc. says I can only post once every 90 minutes whats the point of single login if it just prevents me from asking a question this is worse than yahoo crap.
– Punkroku
51 mins ago
2
For complaints about the system use the meta site. For askubuntu that would be meta.askubuntu.com And it is of course an anti-spam measure. Please ONE question per topic. I answered the history part. The other one needs a separate question.
– Rinzwind
48 mins ago