The basic commands used in Linux are common to every distro:
ifconfig , route , hostname , netstat , arp , mii-tool .
Many distro are now including the iproute2 tools with enhanced routing and networking tools, among these the powerful ip and tc commands.
Every distro has its own configuration tool that operate on variously defined configuration files. Some of them are common: /etc/resolv.conf , /etc/nsswitch.conf , /etc/hosts , /etc/services , /etc/protocols
Some, typically the ones where are defined IP addresses and routes, change. Here are some relevant files for various distro, their syntax may vary according the scripts used to handle them:
Distro |
Configuration Files |
Conf Tool |
Debian |
/etc/network/interfaces - Interfaces and network parameters |
|
RedHat |
/etc/sysconfig/network-scripts/ifcfg-* - Configuration files for each interface. The same file can be found, divided per profile, in /etc/sysconfig/networking/devices/*
/etc/sysconfig/network - Hostname, default gateway, general configuration
/etc/sysconfig/static-routes - Static routes (if any)
|
redhat-config-network |
SlackWare |
/etc/rc.d/rc.inet1 - IP and network parameters
/etc/rc.d/rc.inet2 - Network Services configuration |
netconfig |
Mandrake |
/etc/sysconfig/network-scripts/ifcfg-* - Configuration files for each interface. The same file can be found, divided per profile, in /etc/sysconfig/networking/devices/*
/etc/sysconfig/network - Hostname, default gateway, general configuration
/etc/sysconfig/static-routes - Static routes (if any) |
drakconnect |
Gentoo |
/etc/conf.d/net - Ip network and interfaces parameters
/etc/conf.d/routes - Static routes |
|
SUSE |
/etc/sysconfig/network/ifcfg-* - Configuration files for each interface.
/etc/sysconfig/network/config - General network configuration |
Yast2 |
|