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?

1 Answer 1

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.

2
  • 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
    Commented Jul 14, 2014 at 10:03
  • vt220 should work as well.
    – schaiba
    Commented Dec 15, 2015 at 7:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .