linux新系统配置网络,怎样配置新安装的Ubuntu版Linux系统的..._网络编辑_帮考网

由于Ubuntu的Linux内核对于WPA的加密方式支持不是很好,所有使用普通方式的命令行无法连接WPA2类型的路由器。

1、本机使用无线网,未插入网线

2、查看无线上网网卡

3、设置virtualbox网络>网卡

进入虚拟机

$cd /etc/network/

$ ls

if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  interfaces.d

$ vim interfaces

interfaces文件内容如下

source /etc/network/interfaces.d/*

auto lo

iface lo inet loopback

auto enp0s3

iface enp0s3 inet dhcp

网卡是enp0s3或eth0无所谓,enp0s3是Ubuntu16.04的新属性。dhcp是动态获取IP地址

查看无线网所使用网段、网关等信息

打开物理机的CMD命令行,获取IP信息

ipconfig/all

红色勾勒区域需要写入interfaces文件

将interfaces文件修改如下

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface

auto lo

iface lo inet loopback

# The primary network interface

auto enp0s3

iface enp0s3 inet static

dhcp换成static,动态获取IP换成静态获取;网关可以设置多个;其它一一对应填写即可,照葫芦画瓢即可。

完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值