Linux – Clear terminal using keyboard shortcut

keyboard shortcutslinuxshellterminalUbuntu

I was curious if there is a way to clear the terminal buffer/output through some keyboard shortcut. I am using Ubuntu. I am aware that

Ctrl + L

clears the terminal, but you can still scroll back to see the old text. I am looking for something similar to what

reset 

command does. On Mac

apple + k

seems to do the trick.

Best Answer

In gnome terminal, you can edit the keyboard shortcuts with Edit -> Reset Shortcuts... You can then map the command "Reset and Clear", which seems to do what you're looking for.

Alternatively, you can limit the scrollback history to a small number (say 0) and Ctrl+L will be closer to what you are looking for.