How to erase Bash shell command history

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question









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














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.










share|improve this question









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












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.










share|improve this question









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






share|improve this question









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.











share|improve this question









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.









share|improve this question




share|improve this question








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
















  • 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










2 Answers
2






active

oldest

votes

















up vote
4
down vote













To clear your history use



history -c





share|improve this answer




















  • +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

















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.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    Punkroku is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    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






























    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





    share|improve this answer




















    • +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














    up vote
    4
    down vote













    To clear your history use



    history -c





    share|improve this answer




















    • +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












    up vote
    4
    down vote










    up vote
    4
    down vote









    To clear your history use



    history -c





    share|improve this answer












    To clear your history use



    history -c






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 50 mins ago









    Rinzwind

    199k26381512




    199k26381512











    • +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















    +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












    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.






    share|improve this answer
























      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.






      share|improve this answer






















        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.






        share|improve this answer












        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 14 mins ago









        abu_bua

        2,59751021




        2,59751021




















            Punkroku is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            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.













             


            draft saved


            draft discarded














            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













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery