Nic commands and file setting methods-general Linux technology-Linux technology and application information. For more information, see. Generally, after installing LINUX, LINUX will automatically find and install the NIC Driver. However, there are many ways to set IP addresses, DNS, and gateways.
Command method:
Ifconfig eth0 192.168.0.10 netmask 255.255.255.0 up
# Set the NIC address
Ifconfig eth0 hw ether xx: xx
# Set the hardware address of the NIC
Route add default gw 192.168.0.11
# Set the Default Gateway
Of course, you can also set it in the file
The NIC location in SUSE is
Ifconfig-ethX-(mac address) in/etc/sysconfig/network)
In
The position in CENTOS is set in/etc/sysconfig/network-script/ifconfig-ethX.
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