Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just edited a vhost file via command line

sudo vi /srv/.../vhost.conf

After saving and reopening to add something, strange chars where added to the file:

enter image description here


AuthName "trac"n


AuthName "trac"


Same with AuthUserFile. A ns was added behind it and a path.

Any ideas why this happens and how to avoid it? I also can't remove this chars.

share|improve this question
Questions related to vi and so on are better on – Janne Pikkarainen Aug 5 '11 at 10:39
up vote 2 down vote accepted

If your TERM setting is wrong, editors such as vi can give a slightly scrambled display of text due to the use of inappropriate escape codes when redrawing the edited text. Does the problem disappear when you press Ctrl+L or Ctrl+R? Is the problem visible when you cat or head the file after editing?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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