This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Knowledge Base:Edit a config file

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

Synopsis

Step by step guide to edit a configuration file.

Environment

All the time.

Analysis

Configuration files are the default method to configure most software. Use a text editor to edit them. The default text editor in Gentoo is nano.

Resolution

Start Nano by typing nano -w in the terminal followed by file path and name. To edit the make.conf file, type the following command:

user $nano -w /etc/portage/make.conf

Nano now shows the content of the text file. Navigate through the text with the arrow keys and make edits as desired.

At the bottom Nano shows shortcuts for common actions (save, exit, etc.). The shortcut to save a file is shown as "^O". Users must prefix the shortcut with the Ctrl key, so to save a file press Ctrl+O. To exit press Ctrl+X.

See also

  • nano — an easy to use text editor with additional functionality
  • nano/Basics_Guide — This guide covers basic operations in nano, and is meant to be very concise