linux网络配置,无法解析或者打开软件包列表(Linux network configuration, unable to parse or open the package list)

1、Ubuntu网略配置:

  需求:可以上网,可以与主机互相ping通;

  1.1 编辑虚拟机设置,将虚拟网络适配器改为桥接自动模式;

  1.2 编辑–>虚拟网络编辑器—>更改设置—>选中VMnet0改为自动桥接模式,保存退出;

  上面这样修该如果是默认ip设置,应该可以上网;一般将网络配置静态IP;

2、配置静态IP

  2.1 查看主机的IP地址,打开命令提示符窗口,ipconfig,查看无线局域网适配器(物理主机的网卡)对应的IP地址;这个IP地址才是这台电脑再网络上的IP地址;

  2.2 配置Ubuntu下的IP地址,Ubuntu的下IP的网段与物理地址的网段要在相同的网段内;

   注意添加auto eth0;  这样每次起来的时候,才会自动加载网卡;配置完成后,重启网卡,或者Ubuntu;

3、连接xshell:  需要支持tftp服务,安装ssh服务,对应的sudo apt-get install openssh-server;

  1、新安装的Ubuntu没有安装这个,ps -e|grep ssh查看有没有这个服务;

  2、安装这个服务之前需要先更新下源,sudo apt-get update, sudo apt-get upgrade;

  3、sudo apt-get install openssh-server;

  完成后,可以使用下shell连接ssh root@192.168.7.100,Ubuntu;

4、无法解析或者打开软件包列表:

  可能对应的某些包上,问题原因不清楚;

  解决办法:

  对应博客:https://blog.csdn.net/zxh821112/article/details/17069131

————————

1. Ubuntu network configuration:

Requirements: you can surf the Internet and Ping with the host;

1.1 edit the virtual machine settings and change the virtual network adapter to automatic bridging mode;

1.2 edit — & gt; Virtual network editor — & gt; Change settings — & gt; Select vmnet0 to change to automatic bridging mode, save and exit;

If it is the default IP setting, you should be able to access the Internet; Generally, the network is configured with static IP;

2. Configure static IP

2.1 view the IP address of the host, open the command prompt window, ipconfig, and view the IP address corresponding to the WLAN adapter (network card of the physical host); This IP address is the IP address of this computer on the network;

2.2 configure the IP address under Ubuntu. The network segment of the IP under Ubuntu and the network segment of the physical address should be in the same network segment;

Note to add auto eth0; In this way, the network card will be loaded automatically every time you get up; After configuration, restart the network card or Ubuntu;

3. Connecting to xshell: TFTP service needs to be supported. Install SSH service. The corresponding sudo apt get install openssh server;

1. The newly installed Ubuntu does not have this service installed. PS – e|grep SSH check whether this service is available;

2. Before installing this service, you need to update the source, sudo apt get update, sudo apt get upgrade;

  3、sudo apt-get install openssh-server;

When finished, you can use the following shell to connect to SSH root@192.168.7.100 ,Ubuntu;

4. Unable to resolve or open package list:

The cause of the problem may be unclear on some corresponding packages;

Solution:

  对应博客:https://blog.csdn.net/zxh821112/article/details/17069131