Own Ubuntu system installed a VirtualBox virtual machine, which is equipped with a ubuntu-server system;
1. Set up the character set first, because the first time to install the system when the choice is Chinese, but the inside is always unable to support Chinese, that even if, anyway, English can see the past
Vi/etc/default/locale
Cover it with the following two paragraphs.
Lang= "en_US. UTF-8 "
Language= "En_cn:en"
Exit save, reboot restart the computer;
2.apt-get Update sometimes makes an error, because the system comes with an incorrect path in the Sources.list file, which causes the resource report 404 error to be found
Workaround
①vi etc/apt/sources.list
② will replace the contents of the following (artful can be replaced, mainly see http://mirrors.163.com/ubuntu/dists/below what are the available prefixes to replace themselves)
Save exit
Perform apt-get update
3. The host can ping the virtual machine, and the virtual machine cannot ping the host
① set to bridging mode
② in the config URL (this way configuration, restart invalidation):
>ifconfig eth0 192.168.199.122 netmask 255.255.255.0//Configure Network
>route Add Defaut WG 192.168.199.1//Set up routing, otherwise you can ping the host, but Ping does not pass the extranet
If the above configuration ping network, but still cannot ping the extranet,
>vi/etc/resolv.conf
See where the nameserver is specified (DNS)
The route should be established for the host 192.168.199.1//depending on your situation
Save exit
Try >ping www.baidu.com again.
OK fix;
Linux virtual machine ping does not host and external network (including some problems encountered by the installation system)