Score:1

change Ctrl+L shortcut to clear screen

km flag

I am using Ubuntu desktop and type clear command each time I want to have a clean sheet. I recently found that there is a shortcut for this which is Ctrl+L. However this doesn't function exactly the same as clear. It acts like clear -x. How can I make it act exactly like clear?

Score:3
in flag

add this to your ~/.bashrc

bind -x '"\C-l":clear'

binds key ctrl+l to clear

if you want more commands to run you can separate them with ;

PouJa avatar
km flag
Oh thank you, this works perfectly. What a headache it was searching for a solution. Everywhere I read they had mentioned that Ctrl+L doesn't behave the same as "clear" but they didn't mention how to make a keyboard shortcut to do exactly as "clear"
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.