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. 06-001 DependencyInjection 之 LifecycleKind

    IApplicationBuilder 里有如下一成员: IServiceProvider ApplicationServices { get; set; } HttpContext 里有如下两个成员 ...

  2. CentOS之Shell文件编写基础

    shell文件以.sh结尾,这是一种习惯而已.第一行以#! /bin/bash开头:表示该文件使用的是bash语法: 如果不设置该行,你的shell脚本也可以执行,但是不符合规范.#表示注释. # v ...

  3. MySql 引擎

    存储引擎: 存储引擎就是指表的类型以及表在计算机上的存储方式 它处于MySQL体系架构中Server端底层,是底层物理结构的实现,用于将数据以各种不同的技术方式存储到文件或者内存中,不同的存储引擎具备 ...

  4. 第8课 列表初始化(3)_防止类型收窄、explicit关键字

    1. 防止类型收窄 (1)类型收窄:指的是导致数据内容发生变化或者精度丢失的隐式类型转换. (2)类型收窄的几种情况: ①从浮点数隐式转换为整型数,如int i=2.2; ②从高精度浮点数隐式转换为低 ...

  5. AWS之搭建深度学习主机

    B.G 至2017.11 GPU选型:(参考知乎.CSDN) 高性价比的两款:GTX1080ti, Titan X --通常调试算法  i7CPU+32G内存+SSD+2*GPU(单块显存>6G ...

  6. C语言:传值,传地址

    形参:形式参数实参:实际参数 传值: 把实参的值复制给形参, 修改函数内的形参,不会影响实参. 传地址: 指针传值,形参为指向实参地址的指针 当对形参的指向操作时,相当于对实参本身进行的操作 #inc ...

  7. SP8093 JZPGYZ - Sevenk Love Oimaster(SAM)

    /* 打模板题啊 每个串影响到的集合直接枚举跳parent处理即可 */ #include<cstdio> #include<algorithm> #include<cs ...

  8. 洛谷 P2629 好消息,坏消息

    题目描述 uim在公司里面当秘书,现在有n条消息要告知老板.每条消息有一个好坏度,这会影响老板的心情.告知完一条消息后,老板的心情等于之前老板的心情加上这条消息的好坏度.最开始老板的心情是0,一旦老板 ...

  9. npm降低版本(降级)

    博主现在的npm版本是5.8.0 想要还原到原来的3.8.6,执行以下命令: npm install npm@3.8.6 -g  

  10. 使用vim时生成的.swp文件

    1. 在使用vim时,退出编辑后,发现生成了swp文件,如下: 发现用vim打开一个文件时,都会产生一个.swp的隐藏文件(即文件名.开头的),这个文件是一个临时交换文件,用来备份缓冲区中的内容,用于 ...