1

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?

enter image description here

  • 1
    Does this happen with any command or is it a particular key that causes it? Do you have a file called $HOME/.inputrc? If yes, please post it here. You are logged in as root in the image above (so why are you using sudo?), does this happen with your normal user too? – terdon Mar 14 '14 at 16:24
  • Yes it happens randomly with any commands, I dont have .inputrc files. It also happens before starting ubuntu. – bernaulli Mar 18 '14 at 8:50
  • It also happens with any version of ubuntu or linux, for exeample it also happen with ubuntu LTS and saucy release.. – bernaulli Mar 18 '14 at 8:52
  • 1
    This is probably a problem with your keyboard. Sounds like you have a stuck key. Try cleaning your keyboard or using a different one. – terdon Mar 18 '14 at 15:11
  • Problem was with my keybord – bernaulli May 29 '15 at 10:57
3

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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.