# vim doesn't work in a single user mode



## ccc (Mar 26, 2012)

Does someone know how to get vim working in single user mode? I've tried *vi*, but this command doesn't work.


----------



## SirDice (Mar 26, 2012)

Almost nothing works in single user mode.

Assuming a regular UFS installation:

```
fsck -p
mount -u /
mount -a -t ufs
swapon -a
```

After that you should be able to use vi/vim.

Another option is to use /rescue/vi.


----------



## mamalos (Mar 27, 2012)

SirDice,

If I am not mistaken, *mount -a -t ufs* remounts / with the options found in /etc/fstab (to be honest, when I run *mount -a* in single user mode, it does remount it). Not that it matters, I'm just mentioning it for the sake of completeness .


----------

