When I try to run command in ubuntu I get the garbage characters appear on command line. Please look at the image the line of characters are repetation [[-^ repeating it many times. How do I fix this problem?
The kind of output you are showing is normally due to a stuck key on your keyboard, you can test by using another one. Specifically, the ^[[2~
sequence is sent by Insert. So, you almost certainly have that particular key stuck.
You can try cleaning the Insert key, you can take the key cap off and clean behind it. If cleaning makes no difference, you will probably need to change keyboards.
Try using the command reset
.
reset - terminal initialization
check http://linux.die.net/man/1/reset or type man reset
for more info.
You can also reset your terminal through the "Terminal"->"Reset" menu.
-
This is not really relevant to the problem, reset will clear the screen but the issue will continue. – terdon Mar 29 '14 at 17:12
$HOME/.inputrc
? If yes, please post it here. You are logged in asroot
in the image above (so why are you usingsudo
?), does this happen with your normal user too? – terdon Mar 14 '14 at 16:24