# Exit out of chpass



## hamid ali (Mar 3, 2015)

Hello, I am reading the FreeBSD handbook online within Windows while I have FreeBSD setup in VirtualBox (for basically learning unix until I can get a laptop to put FreeBSD on).

So I am on this page of the handbook: http://www.freebsd.org/doc/en_US.IS...users-synopsis.html#users-modifying-chpass-su

I am looking at the `chpass` command and I cannot figure out who to exit out of it. I made a user 'ahmed' and then logged in as root to execute `chpass ahmed` and am stuck in it.

Thanks in advance.


----------



## tobik@ (Mar 3, 2015)

`chpass` starts an editor which is probably `vi`. Exit by pressing ESC then type :wq or ZZ to save your changes or :q! to quit without saving changes. You can override the editor by setting the environment variable EDITOR. `ee` might be an easier to use editor: `setenv EDITOR ee`


----------



## hamid ali (Mar 3, 2015)

OK, going to read about `vi` and its commands. Is there a command to see what the current evironment variable EDITOR is?


----------



## tobik@ (Mar 3, 2015)

`echo $EDITOR`


----------



## hamid ali (Mar 3, 2015)

tobik said:


> `echo $EDITOR`



OK, thank you.


----------



## SirDice (Mar 4, 2015)

Until you're a bit more familiar with vi(1) (which may take a while as it has  a rather steep learning curve), you may want to set your EDITOR variable to ee(1). It's a simpler editor and it has most of it's commands in a little window for quick reference.


----------

