I've been having this weird problem with typing commands into gnome-terminal. If the command takes up multiple screen lines and I use any backspaces and the stars are in proper alignment the command becomes garbled but is echoed back fine. I typed and was echoed this:

sudo dd if=debian-6.0.5-amd64-businesscard.iso of=/dev/sdb

however that command returned this:

sudddd: command not found

curiously my history contained this:

sudddd o if=debian-6.0.5-amd64-businesscard.iso of=/=/dev/sdb

These garbled commands almost impersonate my intended command. Really really annoying. Also you may note how dangerous this becomes when using sudo. I don't know if anyone has had similar issues and couldn't find anything while googling.


Have modified your bash prompt, PS1? what is its current value set to? If you have bytes that don't add to the length of the prompt, such as terminal escape sequences, and fail to enclose them in \[ \], bash will think the prompt is longer than it is, and lines will wrap around incorrectly. See http://mywiki.wooledge.org/BashFAQ/053

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.