Open CFG File

Information, tips and instructions

Linux equivalent for CFG files

All Linux programs have an executable file with operational codes that the CPU executes to perform specific tasks. The behavior of almost any linux program can be customized according to your preferences or needs by modifying the program configuration files.

Standard configuration file format in Linux

In Linux, each programmer is free to choose the configuration file format they prefer. The formatting options range from the 'shells' file, which contains a list of possible login shells separated by a new line, to the complex 'httpd.conf' Apache file with web server configuration.

System configuration files

The Linux system makes extensive use of the configuration files, regardless of their extension. Although it is more common to find the CONF files, you can also find, in certain occasions, CFG files. Below is an abbreviated list of processes and situations where Linux makes use of configuration files:

Access files

  • Booting and login/logout
  • File system
  • System administration
  • Networking
  • Daemons

It is very common task in Linux to manually edit configuration files. Typically, configuration files are stored in subdirectories as text files.

To make any changes to the configuration, either of any user program, or the configuration of the system itself, you can use any of the programs listed below:

  • Gedit Editor
  • Nano Editor
  • Vim Editor
  • Gvim Editor
  • Emacs Editor
  • Leaf Pad Editor

For example, to edit the web configuration .conf file you must do the following procedure:

Step 1: Locate the file. Location will depend on the distribution and initial location of the Apache server installation. In our case of Debian Linux it is located in:

/etc/apache2/conf-available

Step 2: Because it is a Debian-based distribution with a graphical interface (Raspbian Desktop) there are several ways to open the file:

  • Double click on it and open with 'Leaf Pad'.
  • Use a terminal, and type

    $ sudo nano javascript-common.conf

    Note that the Nano editor has a menu that can be seen at the bottom.

  • Step 3: Once finished editing, close and save the file keeping its extension.

The configuration files in Linux are extremely important and special care must be taken when modifying them, especially the system configuration files.