The most contact in our life is the Windows system, compared to the Linux system, the Windows system configuration IP address is much more convenient.
We all know that in a Windows system, just open "Network and Internet Settings" and select "Change adapter Options" Inside ,
Choose your own network card, click on the properties, select the "Internet Protocol version 4", you can set the host IP address, is also very simple.
so in the Linux system, how to set the host IP address?
First we know that the network card in the Linux system is included in the etc file, enter "Cd/etc" to go to the directory, and then enter the "sysconfig" file, enter LS, to view the currently included files.
Our network card is in the "network-scripts" file.
go to the "network-scripts" directory and enter LS again to view all current files.
One of the "Ifcfg-eth0" is the network card.
Enter "Vim Ifcfg-eth0" to see the information.
You can edit the contents of the letter "I" by typing the word "insert" in the lower left corner.
Change "no" behind "onboot" to "Ye's" to turn on the network card function.
Because the host is configured with its own set of IP address, so "Bootproto" behind the "DHCP (auto Get IP)" to "Static IP".
Next we type:
IPADDR (IP address) = IP address that needs to be configured
NETMASK (subnet mask) = Subnet mask of the configured IP
Gateway address = configured gateway address
After typing, press "ESC" key to exit the edit, you will find the lower left corner of the "insert" disappears, hold "shift+;" Key, you will find that the ":" symbol appears in the lower left corner, and then type "Wq" to enter, you can save this edit and exit.
After returning to the original interface, enter "service network restart" to restart the NIC function.
Enter "Ifconfig" to see that the IP address you just set has been configured successfully.
Thanks for watching
Linux System Configuration IP address