Most FreeBSD configuration is done by editing text files. Because of this, it is a good idea to become familiar with a text editor. FreeBSD comes with a few as part of the base system, and many more are available in the Ports Collection.
A simple editor to learn is ee(1), which stands for
easy editor. To start this editor, type ee
where
filename
filename
is the name of the file to
be edited. Once inside the editor, all of the commands for
manipulating the editor's functions are listed at the top of the
display. The caret ^
represents
Ctrl, so ^e
expands to
Ctrl+e.
To leave ee(1), press Esc, then choose
the “leave editor” option from the main menu.
The editor will prompt to save any changes if the file has been
modified.
FreeBSD also comes with more powerful text editors, such as
vi(1), as part of the base system. Other editors, like
editors/emacs
and
editors/vim
, are part of the
FreeBSD Ports Collection. These editors offer more functionality
at the expense of being a more complicated to learn. Learning a
more powerful editor such as vim or
Emacs can save more time in the long
run.
Many applications which modify files or require typed input
will automatically open a text editor. To alter the default
editor used, set the EDITOR
environment
variable as described in Section 4.9, “Shells”.
This, and other documents, can be downloaded from http://ftp.FreeBSD.org/pub/FreeBSD/doc/
For questions about FreeBSD, read the
documentation before
contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.