Much of the configuration of the Linux operating System revolves around editing the text files which supply the many various system parameters. X-Windows will not always be available, so it's a good idea to get to grips with a basic text editor.
One editor which comes with pretty much all Unix systems is called vi.
Although vi is not especially user friendly [understatement there I think], due to its obscure key commands, I resigned myself to using it and now it doesn't seem half so bad.
To view a file in vi, type, vi filename.txt
Use the arrow keys and page up/page down keys to navigate.
To enter edit mode, press the i key. You can now make changes to the text. Pressing the insert key subsequently, toggles between insert and overtype modes. To end the edit mode, press ESC.
To save the changes, press
ESC and type
:W [ENTER] or
To save and exit automatically, press
ESC and type
:X [ENTER]
To save the changes to another filename, press
ESC and type
:W filename [ENTER]
To exit without saving, press
ESC and type
:q! [ENTER]
vi is certainly a strange piece of software and although there are other, even more obscure key presses, learning the above should be all you need to get it to do what you want - editing Linux's config files.
For a complete listing of vi comands see
Using vi..
- A.