1

When booting FreeBSD (I use 8.4-amd64) in single-user mode, mounting root filesystem in read/write mode and trying to vi some text file, I get all of this file's contents in one line. This makes vi unable to edit text configs.

When running multi-user, all works OK.

How can I fix this?

2

It's because not all config files are read during boot in single-user mode.

In this particular case the problem is in the TERM environment variable not being set properly. To fix this, just type

export TERM=xterm

and vi will work fine until you reboot again.

  • 1
    Colleagues also say they encountered cases with FreeBSD 8.4 when setting TERM=xterm didn't helped to solve the problem, but setting TERM=vt100 did. – AntonioK Jul 14 '14 at 10:03
  • vt220 should work as well. – schaiba Dec 15 '15 at 7:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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