Linux Network configuration-Novice Beginner

Source: Internet
Author: User

Host name configuration:

1.root Login, enter the hostname command, you can see the host name of the current system.

2. Enter the /etc/sysconfig directory, change the network file, enter vi/etc/sysconfig/network, and then change the value after HOSTNAME to the host name you want to set.

3. Enter the/ etc directory, change the hosts file, enter vi/etc/hosts, and then Localhost.localdomain Change to the hostname you want to set.

4. Enter the service networkrestart command to restart the network services.

5. after the reboot is complete, use the hostname command to query the system hostname for configuration success.

Network configuration:

1.root Login, enter the ifconfig command , You can view the network configuration of the current system;

2. Enter the Setup command to start the name service and function;

3. Select the network configuration to enter the Web config;

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/83/05/wKioL1do4N7xjGxgAADaj0B7i-8065.png-wh_500x0-wm_3 -wmp_4-s_1070237745.png "style=" Float:none; "title=" 1.png "alt=" Wkiol1do4n7xjgxgaadaj0b7i-8065.png-wh_50 "/>

4. Select device configuration to enter the equipment configurations;

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/83/06/wKiom1do4OWzBTW8AADNw8-mDys901.png-wh_500x0-wm_3 -wmp_4-s_83472476.png "title=" 2.png "style=" Float:none; alt= "Wkiom1do4owzbtw8aadnw8-mdys901.png-wh_50"/>

5. Select the first item, enter the configuration

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/83/05/wKioL1do4OnzOTQBAADHScsmWbY581.png-wh_500x0-wm_3 -wmp_4-s_401506774.png "title=" 3.png "style=" Float:none; alt= "Wkiol1do4onzotqbaadhscsmwby581.png-wh_50"/>

6. Modify IP address, gateway and subnet mask , save exit after modification is complete

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/83/05/wKioL1do4O2REobOAADOdNWDglU832.png-wh_500x0-wm_3 -wmp_4-s_4227447353.png "title=" 4.png "style=" Float:none; alt= "Wkiol1do4o2reoboaadodnwdglu832.png-wh_50"/>

7. Enter /etc/sysconfig/network-scripts, input the command VI ifcfg-*** ( nic name ), can configure the network interface

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/83/06/wKiom1do4PHyaL-QAAC3YDXAJTA710.png-wh_500x0-wm_3 -wmp_4-s_582836721.png "title=" 5.png "style=" Float:none; alt= "Wkiom1do4phyal-qaac3ydxajta710.png-wh_50"/>



Device= Physical Device Name

Ipaddr=ip Address
netmask= Mask Value
network= Network Address
Broadcast= Broadcast Address
gateway= Gateway Address
Onboot=[yes|no] (whether the device is activated at boot time)
Userctl=[yes|no] (whether the device can be controlled by a non-root user)
BOOTPROTO=[NONE|STATIC|BOOTP|DHCP] (Do not use protocol at boot | static Assignment | BOOTP protocol | DHCP protocol)
HWADDR = Your MAC address

Modify the Bootproto to Static,onboot to Yesso that the NIC will automatically activate each time it is powered on;

8. Enter the service network restart command to restart the Web services;

9. Enter the Ifconfig command to see if the network configuration of the current system is configured successfully.


Linux Network configuration-Novice Beginner

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.