CTRL+L and clear command do two different things (at least when using Bash on Debian):
CTRL+L scrolls the terminal output one screen so you don’t see your previous output, unless you scroll up;
clear does indeed clear terminal output completely, and your previous command history is available only through the history command.
If you want CTRL+L to clear your screen completely you can add following to the .bashrc (or other file that is sourced when starting Bash, e.g. .bash_bindings):
bind -x '"\C-l":clear'
Note that it might not work if you use Vi mode inside Bash, but who does that.
CTRL+L
andclear
command do two different things (at least when using Bash on Debian):CTRL+L
scrolls the terminal output one screen so you don’t see your previous output, unless you scroll up;clear
does indeed clear terminal output completely, and your previous command history is available only through thehistory
command.If you want
CTRL+L
to clear your screen completely you can add following to the.bashrc
(or other file that is sourced when starting Bash, e.g..bash_bindings
):bind -x '"\C-l":clear'
Note that it might not work if you use Vi mode inside Bash, but who does that.