centos icon

CentOS 7 – Network Configuration Files

The Linux kernel names network interfaces with the specific prefix depending on the type of interface. Following the prefix, is numbered, starting with 0.

To get network configuration you can use ip command:

or configuration of specified interface:

ip even can show you the route table:

This is result from my virtual machine on VMware with single NAT interface.

To get or temporarily set hostname just use command hostname:

The hostname resolution (convert hostname to ip). first it looks in /etc/hosts:

If the entry is not found the resolution will go to look at fthe DNS server, which configured in /etc/resolv.conf:

search it’s a list of domain names and the nameserver is ip address of nameserver to query.

About pavel