# Editing with vi



## misfitxnet (Mar 8, 2009)

Hello
I am running a fresh install and trying to edit text with vi, also edit...
however, the displayed text is completely scrambled no matter what I attempt to edit.
Any ideas as to why this would be happening?


----------



## Mel_Flynn (Mar 8, 2009)

Bad terminal perhaps? Try:

```
env TERM=vt100 /usr/bin/vi /etc/defaults/rc.conf
```
If that's scrambled, something else is wrong.


----------



## misfitxnet (Mar 8, 2009)

*editing*

rc.conf does not come up scrambled...
what is a bad terminal?
how do I make all the terminals good so I can just vi -


----------



## estrabd (Mar 8, 2009)

Are you trying to open a directory or binary file?


----------



## fender0107401 (Mar 8, 2009)

How about other commands? ls cat...


----------



## Mel_Flynn (Mar 9, 2009)

Please show echo $TERM in your shell. If it says 'dumb', then you're likely in single user mode.

The TERM environment variable is set in /etc/ttys for any standard virtual terminals. For pseudo-terminals (pty, like through ssh) it is taken from the environment of the remote machine.

See environ(7) and termcap(5).


----------

