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] 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
- [Fix] Linux - bash: useradd: command not found
- Calculate days between dates using dateutils ddiff command
- pwd Command - Print Working Directory
- Rename a directory using Linux/Unix command
- How to go to the End of File in Nano Editor
- How to tar.gz a directory or folder Command
- How to remove/delete a directory in Linux/macOs
- How to Display content of a file in Terminal Screen?
- ls command sort by file size [Linix/UNIX/macOS/bash]
- How to Copy Entire Directory to another Directory in Linux
- 3 ways to clear screen on Linux Terminal
- Command to check Last Login or Reboot History of Users and TTYs
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to backup a file in Linux/Unix
- Command to know the installed Debian version?
- Check SSH/OpenSSH version Command
- 3 Commands to stop Nginx Server
- Linux: Create a New User and Password and Login Example
- How to install npm on Ubuntu
- How to List All Users in Linux
- How to Get the List of Shells on Linux
- Fix - ssh-copy-id no identities found error
- Installing and using unzip Command to unzip a zip file using Terminal
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- zsh hello world example
- [Docker] Install Git on Alpine Linux - Docker
- How to get weather details in Command Prompt, macOS or Linux Terminal - HowTos
- Notepad++ display files on tab bar as horizontal instead of vertical - NotepadPlusPlus
- Tomcat Manager Default Username and Password - Tomcat
- Fix Error 2711 SQL RBS client - The installer has encountered an unexpected error. The specified Feature name ('Docs') not found in Feature table - SharePoint
- Windows 10 now has a new enhanced Calculator with a new icon - News
- Run JumpCloud Commands in Powershell - Powershell
- Building library Gradle Project Info: Downloading services.gradle.org - Android-Studio