How to change the machine name and IP address in linux
Source: Internet
Author: User
In linux, the first method is to change the machine name and IP address, and the second method is to use the network management tool that comes with linux: use vi to edit/etc/sysconfig/networkand/etc/sysconfig/network-scripts/ifcfg-eth01)/etc/sysconfig/networkNETWORKINGy... how to change the machine name and IP address in linux: use vi to edit/etc/sysconfig/network and/etc/sysconfig/network-scripts/ifcfg-eth0 1) /etc/sysconfig/networkNETWORKING = yesFORWARD_IPV4 = yesHOSTNAME = xxxx.com # Your host name GATEWAY = 123.123.123.123 # gateway gatewaydev = eth0 2) /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE = eth0IPADDR = xxx. xxx. xxx. xxx # Your IP address NETMASK = xxx. xxx. xxx. xxx # your subnet mask NETWORK = xxx. xxx. xxx. xxx # Your Work Network BROADCAST = xxx. xxx. xxx. xxx # Your broadcast address ONBOOT = yes and then run/etc/sysconfig/network-scripts/ifup eth0 to start
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