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. c#day02

    using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace testmys ...

  2. java 根据日期获取星期

    private String getWeek(String date) { String[] arr=date.split("-"); Calendar calendar = Ca ...

  3. python基础知识-(1)语法基础知识总结(转载)

    1.Python标识符 在 Python 里,标识符有字母.数字.下划线组成. 在 Python 中,所有标识符可以包括英文.数字以及下划线(_),但不能以数字开头. Python 中的标识符是区分大 ...

  4. RecyclerView.Adapter封装,最简单实用的BaseRecyclerViewAdapter;只需重写一个方法,设置数据链式调用;

    之前对ListView的BaseAdapter进行过封装,只需重写一个getView方法: 现在慢慢的RecyclerView成为主流,下面是RecyclerView.Adapter的封装: Base ...

  5. solr 忽略大小写

    1.types标签下加入如下fieldType <fieldType name="str_lower" class="solr.TextField" so ...

  6. 「ZJOI2015」地震后的幻想乡

    /* 难度最低的解法 钦定一个边集S作为前S小如果这个边集假如第|S|小这条边时加入时S恰好联通, 那么我们就能够算出他的贡献了 恰好联通 = 加了这条边之前不连通方案数 - 加了这条边之后不连通方案 ...

  7. 初级安全入门—— WEBshell与文件上传漏洞

    概念介绍 WebShell网页木马文件 最常见利用文件上传漏洞的方法就是上传网站木马(WebShell)文件,根据开发语言的不同又分为ASP木马.PHP木马.JSP木马等,该木马利用了脚本语言中的系统 ...

  8. rpm和yum的区别

    rpm 只能安装已经下载到本地机器上的rpm 包, yum能在线下载并安装rpm包,能更新系统,且还能自动处理包与包之间的依赖问题,这个是rpm 工具所不具备的.

  9. jmeter获取token并请求失败Internal authentication failed 400

    jmeter访问token报错400 1.请求token地址 2.运行jmeter报错-run 3.400的意思是: 400(错误请求) 服务器不理解请求的语法. 4.报错信息如下 {"er ...

  10. StanFord ML 笔记 第九部分

    第九部分: 1.高斯混合模型 2.EM算法的认知 1.高斯混合模型 之前博文已经说明:http://www.cnblogs.com/wjy-lulu/p/7009038.html 2.EM算法的认知 ...