After installing CentOS system, it is necessary to make network related settings for CentOS system, so that CentOS can be networked. The following small series introduces you to CentOS using vim to manually configure network related The method will involve some commands, and if you are interested, you can understand it.
Several network-related commands are as follows:
fixed IP address
[root @ localhost ~] # vi /etc /sysconfig /network-scripts /Ifcfg-eth0
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29:D1:A6:ED
ONBOOT=yes
IPADDR =192.168.160.11
NETMASK=255.255.255.0
BROARDCAST=192.168.160.255
GATEWAY=192.168.160.1
[root@localhost ~]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:D1: A6: ED
inet addr:192.168.160.11 Bcast:192.168.160.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed1:a6ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 13960 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 4796 errors: 0 dropped: 0 overruns :0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3749651 (3.5 MiB) TX bytes:480572 (469.3 KiB)
Interrupt:75 Base address :0x2000
Configuring DNS Addresses
[root@localhost ~]# vi /etc/resolv.conf
[root@localhost ~]# cat /etc/resolv. Conf
search localdomain
nameserver 192.168.160.1
nameserver 202.101.172.46
Modify hostname
[root@localhost ~] #vi /etc/sysconfig/network
[root@localhost ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME =leekwen.leekwen
[root@localhost ~]# ifconfig eth0
[root@localhost ~]# vi /etc/resolv.conf
[root@localhost ~ ]# cat /etc/resolv.conf
search localdomain
nameserver 192.168.160.1
nameserver 202.101.172.46
The above is CentOS using vim to configure the network Related methods introduced, you need to configure a fixed ip address, DNS address, modify the host name, this article describes the settings under vim, you need to use the vim text editor.
Samba is a tool that can implement SMB protocol. You can share Linux system software through Samba s
Users who are accustomed to using Windows systems are inevitably somewhat uncomfort
Linux users often encounter php files. In the face of these php files, we sometimes use the command
Computer operating systems generally have their own screenshot shortcuts, and many
How to clean up Git and Repo invalid code in Linux system
Linux how to use the cal command to view the calendar
Linux file method using file command to identify the file type
Linux system hardware routing forwarding principle
How to initialize the CentOS server
Usage summary of chkconfig command under Linux
How to change the jenkins port number on Ubuntu
How to install boost library in Linux system
Linux restart oracle database three major techniques
Prohibit PHP execution permission for a directory under Apache
LOL captain Planck glory returns to the former hegemonic skin everyone
What should I do if the Win8.1 system laptop is still using power after shutting down?
How to get rid of the trouble of win10 reset failure? One-click restore win10 is easier
Under the Win8 system, the task manager can't open
Win8 magnet line number conversion method diagram tutorial
Windows10 preview version 9860 how to close the window effect