There should be a command on terminal that hides the history belongs a specific tab and lets you start from the beginning of the tab like it is new, but when you scroll up with a mouse you can see your history. I can't remember and find it online. I hope someone can tell it.
How to hide previous commands/history in terminal and start like the beginning of the tab
terminal
Related Question
- ITerm spits out text every time I start a new session – why, and how to stop it
- MacOS – Reset terminal environment to start up state, not losing print of history
- MacOS – How to set the terminal tab title via command line
- How to clear “bell” flag (icon, sound) in Terminal tab
- MacOS – Process completed immediately after opening Terminal and impossible to add commands
- How to programmatically get the Terminal scrollback text
Best Answer
If you want to clear your terminal window:
clear
to clear whatever is showingcommand+K
to clear everythingThere are other things you can try too: https://stackoverflow.com/questions/2198377/how-to-clear-previous-output-in-terminal-in-mac-os-x