https://andrewbaker.ninja/wp-content/themes/twentysixteen/fonts/merriweather-plus-montserrat-plus-inconsolata.css

👁12views
Macbook Tip: iTerm2 clearing your scroll back history

CloudScale SEO — AI Article Summary
What it isThis article explains how to clear iTerm2's scroll back history using Command + K, distinguishing it from Control + L which only clears the visible screen.
Why it mattersKnowing this shortcut helps you truly clear your terminal history instead of just hiding it temporarily, which is useful for privacy or decluttering your workspace.
Key takeawayUse Command + K in iTerm2 to permanently clear scroll back history, not Control + L which only clears the current screen.

I frequently forget this command shortcut, so this post is simply because I am lazy. To clear your history in iTerm press Command + K. Control + L only clears the screen, so as soon as you run the next command you will see the scroll back again.

If you want to view your command history (for terminal) type:

$ ls -a ~ | grep hist
.zsh_history
$ cat .zsh_history

One thought on “
👁12views
Macbook Tip: iTerm2 clearing your scroll back history”

  1. I’d prefer to use `less $HISTFILE`
    So, no matter what you name the command line history file

Leave a Reply to Pascal Cancel reply

Your email address will not be published. Required fields are marked *