1.查看所有可用网卡

$ ifconfig -a
# -a display all interfaces which are currently available, even if down

2.编辑配置文件

$ sudo vim /etc/network/interfaces

3.添加可用网卡信息

# 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 dhcp # Host-Only network interface
auto enp0s8
iface enp0s8 inet static
address 192.168.56.100
netmask 255.255.255.0
gateaway 192.168.56.1

在VBox中安装虚拟机时,网卡enp0s8默认是没有配置的,这里手动配置一下。

4.重启网络服务

$ sudo systemctl restart networking
# 或
$ sudo /etc/init.d/networking restart

5.查看网卡信息

$ ifconfig

Ubuntu网卡配置的更多相关文章

  1. ubuntu网卡配置及安装ssh服务

    1.ubuntu网卡配置 1.查看网卡名称 ip a 2.进行编辑网卡配置文件 sudo vi /etc/network/interfaces 更改网卡配置文件添加内容修改内容如下:下面的enp0s3 ...

  2. 【转】Ubuntu网卡配置

    一.网卡地址配置Ubuntu的网络配置文件是:/etc/network/interfaces1.以DHCP 方式配置网卡   auto eth0   iface eth0 inet dhcp用sudo ...

  3. linux ubuntu 网卡配置---固定IP

    需要修改/etc/network/interfaces和/etc/resolvconf/resolv.conf.d/base两个文件. 1) /etc/network/interfaces文件: 首先 ...

  4. ubuntu 网卡配置

  5. ubuntu 14.04网卡配置以及关闭防火墙

    一.Ubuntu网卡配置如下: 在文件/etc/network/interfaces中进行以下配置 auto lo iface lo inet lookback auto eth0 iface eth ...

  6. ubuntu下为单个网卡配置多个ip

    参考文档: https://www.jb51.net/os/Ubuntu/418951.html https://blog.csdn.net/ying1989920/article/details/4 ...

  7. 【Linux】ubuntu或linux网卡配置/etc/network/interfaces

    转自:http://gfrog.net/2008/01/config-file-in-debian-interfaces-1/   青蛙准备写一个系列文章,介绍一些Debian/Ubuntu里面常用的 ...

  8. 【转】ubuntu或linux网卡配置/etc/network/interfaces

    转自:https://www.cnblogs.com/qiuxiangmuyu/p/6343841.html 青蛙准备写一个系列文章,介绍一些Debian/Ubuntu里面常用的配置文件.当然,Lin ...

  9. Ubuntu 为网卡配置静态IP地址

    为网卡配置静态IP地址编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primar ...

随机推荐

  1. SCCM 2012 R2实战系列之三:独立主站点部署

    3.1 SCCM 2012 R2主站点的安装 SCCM 2012 R2跟以前的SCCM 2007不同的是多了一个管理中心站点的角色, 管理中心站点主要负责SCCM管理控制和报表查看. 主站点跟以往的S ...

  2. UE4中多种颜色轮廓线的后期处理

    转自:http://blog.csdn.net/pizi0475/article/details/50396277 随着近来虚幻引擎4的一些变化,渲染多种颜色的轮廓线已经可以实现了!通过自定义模板,类 ...

  3. python容器数据类型的特色

    python容器数据类型的特色 list:           可变数据类型(不可哈希), 有序, 可索引获取, 可修改 Dict:         可变数据类型(不可哈希), 3.6版本有序, 可通 ...

  4. visual studio 2017调试时闪退。

    解决方案: 在工程上右键--->属性--->配置属性--->连接器--->系统--->子系统(在窗口右边)--->下拉框选择控制台(/SUBSYSTEM:CONSO ...

  5. 使用原子类或synchronized(没用Lock)解决阐述多线程所遇到线程安全问题和解决方案

    例子题目: 创建10个线程,每个线程执行10000次加1,输出总和 正常结果100000  但是如果出现线程不安全会低于100000 import java.util.concurrent.Count ...

  6. Jscraft 使用 Shell 与预先加载别名混合使用

    Session session = a.getSessionShell("user", "pwd", "host"); Channel ch ...

  7. StanFord ML 笔记 第十部分

    第十部分: 1.PCA降维 2.LDA 注释:一直看理论感觉坚持不了,现在进行<机器学习实战>的边写代码边看理论

  8. [Lua]string与中文

    参考链接: https://baike.baidu.com/item/%E5%AD%97%E7%AC%A6%E7%BC%96%E7%A0%81/8446880?fr=aladdin#7 http:// ...

  9. python中 将你的名字转化成为二进制并输出

    1 name = "吴彦祖" 2 for i in name: 3 i_by = bytes(i, encoding = "utf-8") 4 for i_bi ...

  10. 【4-1】js函数、事件、补充知识

    一.函数操作 (一)字符串操作: (1)变量名.toLowerCase():--转小写     toUpperCase():----转大写 (2)变量名.substring(索引,截取到位数);--- ...