Downloads and installs for virtual machines (Oracle VM VirtualBox) and Linux (RedHat) I don't say much here, all kinds of documents and videos on the Internet are very full. But I will share with you in the future blog post the problems and solutions that I have encountered.
Here I would like you to configure the network in the Linux console, because such a professional (because I have seen a long time of the Buddies also use visual matching, although nothing but I still small despise him a bit, hey)
Linux is presented as a directory, so we need to find the root of the network first
[[email protected] ~]# This is the initial state of the login, localhost for the host; ~ Representative home directory; #这个代表为root登陆
[[Email protected] ~]# CD/ like operation we will switch to the root directory (/)
[[email protected] ~]# Ifconfig before configuration we can check the IP now
inet addr:192.168.56.104 bcast:192.168.56.255 mask:255.255.255.0
These three addresses are basic IP information, which is the information I want to modify.
[[Email protected]/]# CD etc/sysconfig/network-scripts then switch to the directory of the network configuration, where etc is the root directory of all the configuration files.
[email protected] network-scripts]# cat Ifcfg-eth0 Here We also check the network information, Eth0 is the NIC information.
[[email protected] network-scripts]# VI ifcfg-eth0 so you can edit your IP.
[[email protected]/]# Service Network Restart Restart the Web service.
[[email protected] network-scripts]# reboot changes must remember to restart, because we modify the file information is read the disk, so restart before it takes effect.
[[email protected]/] VI etc/sysconfig/network here can see the host name, also can be modified by themselves.
We have just started to contact so it is inevitable that the wrong information, causing the host ping does not pass the virtual machine IP, which is generated in the network configuration ifcfg-eth0.bak file, so we have to find him, and to delete. It usually occurs in 3 places.
[email protected]/]CD etc/sysconfig/networking/devices
[Email protected]/]CD Etc/sysconfig/networking/profiles/default
[Email protected]/]CD etc/sysconfig/network-scripts
Execute LS or ll command and we'll see Ifcfg-eth0.bak,
[[email protected]?] RM-RF Ifcfg-eth0.bak in their own root directory to delete it? Represents the root directory in which it resides.
The visualization configuration is relatively simple.
Menu: System--->administration--->network can be configured so much easier, but everyone better in the console configuration, after all, we are more professional?
Because I am according to the knowledge point to go, so there will only be relevant knowledge points of command, we understand a lot.
Well, it's here today, not in place or in the unclear place welcome to the discussion AH. Fight for a week and one more.
This article is from the "Guardian" blog, make sure to keep this source http://kaier.blog.51cto.com/4166837/1924794
Linux Fundamentals 02-Network configuration