How to change settings on Linux Systems

From CyberWurx Customer Wiki

Revision as of 20:03, 2 November 2007 by Cwadmin (Talk | contribs)
Jump to: navigation, search

This area will discuss the different operating systems we offer and where to change important system files.

Contents

Networking

The core system files of your network.

CentOS

CentOS will store network settings inside a directory named:

/etc/sysconfig/network-scripts/

The particular file that has your settings (depending on your interface), would be:

ifcfg-eth0 (or eth1 etc...)

The ifcfg-ethX file will look something like this:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
  • These settings are an example and by no means reflect your configuration.

Netconfig

These settings may be a little cryptic to the normal user, so CentOS came packaged with a network configuration interface.

Simply use the following command at your bash prompt:

netconfig

You will see a easy to understand, easy to use menu come up and allow you to enter your networking data.

After modifying your network information, you should either reboot or issue the following:

/etc/init.d/networking restart

Debian

Debian has a very uniform way of storing network settings and they are very easy to read and edit.

Network settings are stored in:

/etc/network/interfaces
  • Unlike CentOS, each interface's configuration will be stored in this file.

The file will look similar to this:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 192.168.0.2
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
iface eth1 inet static
        address 192.168.0.3
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
  • These settings are an example and by no means reflect your configuration.

To edit your network settings, simply change each value for each address.

Adding ips is simple as well. If you want a virtual interface simply add an area that looks similar to:

iface eth0:1 inet static
        address 66.154.82.74
        netmask 255.255.255.248
  • The eth0:1 part will increment every time you add a virtual interface. (eth0:2, eth0:3, etc...)

To restart your network services, simply issue the network restart script:

/etc/init.d/networking restart

Fstab

Personal tools