To clear the Terminal screen on Mac you can make use of the "clear" command,Syntax:
Let's see a demo, below in the gif you can see I ran multiple commands and used the command clear to clean the screen. As soon as the command was fired all the text got cleared and the prompt moved to the top of the window.
As you can see after the screen is cleared when I scroll the window up, I can yet see the previous commands, there is a blank space added after the clear command.
You can read more about the clear command by taking a look at the manual,
% man clear clear(1) clear(1) NAME clear - clear the terminal screen SYNOPSIS clear DESCRIPTION clear clears your screen if this is possible. It looks in the environment for the terminal type and then in the terminfo database to figure out how to clear the screen. clear ignores any command-line parameters that may be present. SEE ALSO tput(1), terminfo(5) This describes ncurses version 5.7 (patch 20081102).
Clear Terminal Screen using Keyboard Shortcut
There is another quick way to clear the Mac Terminal screen and that is using the keyboard key combinations
Clear the previous command text
Press the Key Combinations Command + L to clear the screen to the previous mark. By pressing these keys multiple times you can clear the screen incrementally.
Clear full screen using Keyboard
Press the Key Combinations Command + K to clear the whole screen just like the clear command.
Have Questions? Post them here!
- Opening mac Terminal
- How to change default macOS Terminal Window size
- How to clear Mac Terminal screen
- Find Hostname of Mac running on macOS Ventura 13
- Installing MongoDB on Linux/Unix/macOS/Ubuntu
- How to switch from bash to zsh shell in macOS Terminal
- Limit scrollback rows in macOS Terminal
- How to Set Background Wallpaper on macOS 13 Ventura
- This operation couldnt be completed. Unable to locate a Java Runtime. [macOS]
- Encode or Decode Base64 String using Mac Terminal Command
- List of All Apple Silicon ARM Based M1/M2 Mac [updated Oct 2022)
- How to remove Siri from Menu Bar [macOS Big Sur]
- Must Know Homebrew Commands for Mac/Linux Users
- Hide Keyboard Text Input Icon on macOS Ventura Menu Bar
- 13.0 MacOS Ventura release date
- How to change the default location of Mac Screenshot
- How to set Out Of Office (OOO) on Outlook for Mac
- 30+ Zoom video communications application shortcuts for macOS
- How to install wget on macOS
- Mac turn dark mode on or off using terminal command
- Create Symbolic Link using Terminal Command
- Mac - How to Install VirtualBox
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to install homebrew (brew) on M1 Mac
- How to uninstall Microsoft Outlook on Mac
- How to reset eclipse layout - Android
- How to Clear Gradle Cache on Mac - Gradle
- [Solved] SharePoint Search Internal server error exception - SharePoint
- Trace using cURL Command Example - cURL
- Get the current timestamp in Java - Java
- Install the minimal Linux on Docker (only 5 mb Alpine Linux) - Docker
- [Fix] Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range - Java
- MySQL 1005 Error : SQLSTATE: HY000 (ER_CANT_CREATE_TABLE) Message: Can't create table '%s' (errno: 150) - MySQL