Common configuration files in Linux

Source: Internet
Author: User

/Etc/sysconfig/network includes the basic network information of the host for system startup.

/Etc/sysconfig/network-script/the directory contains the information about the most initialized network started by the system.

/Etc/sysconfig/network-script/ifcfg-eth0 network configuration information

/Etc/xinetd. conf defines the network service started by the super process xinetd.

/Etc/protocols sets the protocol used by the host and the protocol numbers of each Protocol

/Etc/services: network services with different ports on the host

// Network Configuration Tool

# RedHat-config-network

/* Use the ifconfig command to configure and view network interfaces */

// Configure the IP address of eth0 and activate the device

# Ifconfig eth0 192.168.168.119 netmask 255.255.255.0 up

// Configure the IP address of the eth0 alias device eth0: 1 and add the route

# Ifconfig eth0: 1 192.168.168.110

# Route add-host 192.168.168.110 Dev eth0: 1

// Activate (disable) the device

# Ifconfig eth0: 1 up (down)

// View all (specified) network interface configurations

# Ifconfig (eth0)

/* Use the route command to configure the route table */

// Add to host route

# Route add-host 192.168.168.110 Dev eth0: 1

# Route add-host 192.168.168.119 GW 192.168.168.1

// Route added to the network

# Route add-net IP netmask mask eth0

# Route add-net IP netmask mask GW IP

# Route add-net IP/24 eth1

// Add a default gateway

# Route add default GW IP

// Delete a route

# Route del-host 192.168.168.110 Dev eth0: 1

/* Common commands */

# Traceroute www.pconline.com.cn

# Ping www.pconline.com.cn

// Display the network interface status

# Netstat-I

// Display the sockets of all monitored servers andProgramInformation

# Netstat-LPE

// Display kernel route table information

# Netstat-R

# Netstat-NR

// Display the connection status of TCP/UDP transmission protocol

# Netstat-T

# Netstat-u

// Change the Host Name

# Hostname myhost

// View ARP cache

# ARP

// Add

# ARP-s IP Mac

// Delete

# ARP-D IP

/* Running level and Network Service */

// View the current running level

# Runlevel

// Switch the running level

# Init

# Telinit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.