Skip to content

Basic configuration using rc.conf.

Robert Nagy edited this page Mar 22, 2015 · 4 revisions

Basic configuration in /etc/rc.conf

CargOS uses /etc/rc.conf to determine what will be executed when the system boots. Understanding this file is important.

The /etc/defaults/rc.conf file contains the default values for most settings. To override a default value, the new value must be put into /etc/rc.conf. The definitions there override the ones in /etc/defaults/rc.conf (which you should leave unchanged).

Define a hostname for your machine (use a fully qualified hostname, i.e., one including domain).

If you have a standalone machine you can use any name (for example, vigor3.your.domain). If your machine is connected to a network, you should supply the correct name. (e.g. hostname=vigor3.your.domain). By default CargOS uses your MAC address of the configured network interface.

Default gateway

If your are connected to a local network or the Internet through a router, set the defaultroute variable to the IP address of your router (sometimes called a default gateway). For example, “defaultroute=192.168.1.1”.

Network interface configuration

Network interface configuration also happens in /etc/rc.conf. For example to configure the interface called ens3 to use dhcp, one would need to add ifconfig_ens3=dhcp to /etc/rc.conf. If a static configuration is preferred, one would use ifconfig_ens3="inet 192.168.0.1 netmask 255.255.255.0".

Clone this wiki locally