Some useful Linux configuration files. How the system is setup.

/etc/profile

This configuration file controls the system-wide environment variables. This contains the PATH variable that controls where executables may be run from system-wide.

/etc/motd

This file contains a message that will be visible above the login prompt on the virtual console. Usually this is auto-generated regularly containing system messages such as disk file-system check results and other useful information. Linux Mint 12 does this. You may modify this file to customize your system.

/etc/init.d/rc.local

The rc.local file is a bash shell script that will be executed last during the system boot process after all of the other init scripts have completed. You may insert custom commands into this file that will be executed after every other command has finished. On my Linux Mint 12 system, this script in turn calls the /etc/rc.local script and runs any commands that it contains. Other systems could vary. if the /etc/rc.local shell script exists, then it would be the place to enter your custom commands.

/etc/hostname

This file contains your system hostname. You need to edit this file to set a new hostname and then use the sudo hostname mycomputer to set the new hostname, to mycomputer or what ever you wish it to be.

/etc/ld.so.conf

This configuration file contains the list of folders that contain library files such as libSDL.so and others. If you are installing software into the /usr/local folder from source, you will need to add that folder to the /etc/ld.so.conf file so that it will work properly when you type sudo ldconfig.

/etc/cron.*

This folder contains scripts that will run certain commands as certain times, there are four cron directories that will run commands within hourly, daily, weekly or monthly. The format of the cron files consists of shell scripts that are easy to edit and add your own commands.

/etc/hosts

The /etc/hosts file contains a list of hosts and hostnames. An example is shown below. if you add a url such as I have at the bottom of this file, then it will be blocked. The system hostname is also defined at the top of the file.

127.0.0.1	localhost
127.0.1.1	deusexmachina

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
0.0.0.0	doubleclick.net	# blocked by mintNanny

/etc/resolv.conf

This configuration file is where the ip addresses of the primary and secondary nameservers are defined. With modern Linux distributions this will be taken care of automatically and you should not have to worry about this file too much.

# Generated by NetworkManager
domain Home
search Home
nameserver 192.168.1.1

The example above shows the configuration I am using on my Linux Mint 12 installation. It only contains the ip address of my router. The /etc/resolv.conf for my Debian Squeeze installation is exactly the same.

No comments have been made. Use this form to start the conversation :)

Leave a Reply