The most used command to clear the screen on Linux Terminal (Command Line) is obviously clear, but do you know there are some more ways that you can try out!
Ways to clear Linux Terminal Screen
- Using Clear command
- Using Keyboard shortcut: Control + L
- Using Alias
You can know more about this command by using the help!
root@myLinux# clear ?
Usage: clear [options]
-T TERM use this instead of $TERM
-V print curses-version
-x do not try to clear scrollback
Just press Control + L (Command + L if on macOS), you will see that the screen will get cleared! When you do this you will see not the whole screen is cleared at once, but command-by-command, so you can press Control + L, multiple times to clear as much screen real estate as you want!
If you want to use your own word as a command to clear screen, you can make use of Aliases, just update bash_aliases to add you custom alias,
# sudo nano ~/.bash_aliases
Add the following to the file and save: alias cls="clear"
# sudo source ~/.bash_aliases
- Command to know the Available Memory on Linux System
- How to install curl on Alpine Linux
- How to backup a file in Linux/Unix
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu
- What is the Default Admin user and Password for Jenkins
- How to tar.gz a directory or folder Command
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: bash: ipconfig: command not found on Linux
- Command to check Last Login or Reboot History of Users and TTYs
- Linux: Create a New User and Password and Login Example
- ls command to list only directories
- bash: cls: command not found
- How to exit from nano command
- Installing and using unzip Command to unzip a zip file using Terminal
- What does apt-get update command does?
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- How to remove or uninstall Java from Ubuntu using apt-get
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- Sort ls command by last modified date and time
- Create Nested Directories using mkdir Command
- How to Exit a File in Terminal (Bash/Zsh)
- Command to know the installed Debian version?
- How to connect to SSH port other than default 22
- How to save a file in Nano Editor and Exit
- Install OpenSSL on Linux/Ubuntu
- [Tutorial] Write And Run Python Code In Notepad++ Editor - NotepadPlusPlus
- How to find path of file on Mac Terminal - MacOS
- 3 ways to clear screen on Linux Terminal - Linux
- Fix: FileNotFoundError: [Errno 2] No such file or directory: Python - Python
- How to Cut Copy and Paste in Nano Text Editor - Linux
- JSON Schema Validator Libraries: JSON Tutorial - Json-Tutorial
- Clearing the Cache in Firefox Web Browser - HowTos
- Okta Hacked - Source Code Stolen from GitHub Repo - News