• Background
    • Awards
    • Biography
    • Resume
  • Blog
    • Articles
    • Cookie Policy
    • Galleries
      • Photo Gallery
      • Video Gallery
    • Glossary
  • Contact
    • Contact
    • Social Networks
  • IT
    • Downloads
      • Windows
    • Equipment
    • Hardware
    • Software
    • Testimonial
    • Information Technology
  • Projects
    • Business Projects
    • HackBook Projects
    • Hackintosh Projects
    • Website Projects
    • More Projects
  • Service Rates
    • Business Rates
    • Residential Rates

Clear the Terminal or Bash History

Thursday, September 18, 2003 Articles, Tips Comments Off on Clear the Terminal or Bash History

Do you need to learn or know how to clear the Terminal or Bash history on macOS? I notice that it tracks what was entered previously by myself or those sharing the system so when I am done in the Terminal, I enter the following.

rm ~/.bash_history; history -c (Works in macOS Catalina and later.)

It is two lines of code that are separated by a semicolon to make it simple to execute.

https://www.youtube.com/watch?v=als3U2AZ0Q4

What Happens
By using rm ~/.bash_history, it temporarily removes or deletes ~/.bash_history. Once you start to use the Terminal, it is recreated and produces an output when history is executed. To make sure no one knows you executed the remove command, you execute history -c as it clears the history for the current shell.

Required Permissions
If you are using an account that is placed in the automatic login field and is not given the password, you should know that sudo is not required.

The following two tabs change content below.
  • Bio
  • Latest Posts
facebook-profile-picture
My Twitter profileMy Facebook profileMy LinkedIn profileMy Pinterest profileMy YouTube channel

Stephan Pringle

Chief Executive Officer at Sipylus
About The Author: Stephan Pringle is an Information Technology Specialist. He covers hardware and software and provides tips for you to troubleshoot and repair issues on your own. In his spare time, he writes articles about the State of New York on his Hackintosh and HackBook and that has helped him to become the top contributor of the New York City section of Yahoo! Answers.
facebook-profile-picture
My Twitter profileMy Facebook profileMy LinkedIn profileMy Pinterest profileMy YouTube channel

Latest posts by Stephan Pringle (see all)

  • The New Microsoft Edge is Old - Friday, January 15, 2021

Related posts:

  1. Your YouTube History
  2. Gatekeeper
  3. Administrator Command Prompt
  4. Command Prompt
  5. Enable Pause in QuickTime for macOS
  6. Computer Management
  7. Removing the McAfee Agent
  8. Revert CoreStorage
  9. EFI Mounter
  10. Run Window
  11. Domain Extensions
  12. Create Install Media
  13. PHP4
  14. Permissions Error in Outlook
  15. Using Windows 10 in macOS
  16. Dell Latitude E6410
  17. Microsoft Word Force Exit
  18. Remote Desktop Entries
  19. Recover a Crashed Hard Drive
  20. Remove the K1000 Agent

Comments are closed.




Copyright © 1990-2020 Stephan Pringle. All rights reserved.

Stephan Pringle

IT Technical Support Specialist

  • Keyword Search

  • Translator

  • Topic Sponsor

I am always working to improve your experience on my website. Part of this involves using cookies to collect anonymous data for statistics and personalization. Learn more