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. 配置Jsp错误页面

    配置Jsp错误页面一般我们有2种做法: (1)在页面中用指令进行配置,即page指令的errorPage和isErrorPage:可以使用page指令的errorPage来指定错误页!在当前JSP页面 ...

  2. jQuery设置div的自适应布局

    一.HTML代码: <div class="ui-wraper" id="Wraper"> </div> 二.CSS代码: html { ...

  3. centos7 安装 nvm

    cd 到 /usr/local下创建nvm文件夹,并进入nvm目录, 执行命令: wget -qO- https://raw.githubusercontent.com/creationix/nvm/ ...

  4. Python网络爬虫相关基础概念

    什么是爬虫 爬虫就是通过编写程序模拟浏览器上网,然后让其去互联网上抓取数据的过程. 哪些语言可以实现爬虫    1.php:可以实现爬虫.php被号称是全世界最优美的语言(当然是其自己号称的,就是王婆 ...

  5. WPF Stake

    WPF中的StackPanel.WrapPanel.DockPanel 转:http://blog.sina.com.cn/s/blog_6c81891701017a34.html StackPane ...

  6. 三种常见的Web安全问题

    XSS漏洞 1.XSS简介 跨站脚本(cross site script)简称为XSS,是一种经常出现在web应用中的计算机安全漏洞,也是web中最主流的攻击方式. XSS是指恶意攻击者利用网站没有对 ...

  7. RxJava学习(一)——简介及其优势

    参考:给 Android 开发者的 RxJava 详解 RxJava是什么 RxJava 在 GitHub 主页上的自我介绍是 "a library for composing asynch ...

  8. javascript中的立即执行函数(function(){…})()

    javascript中的立即执行函数(function(){…})() 深入理解javascript中的立即执行函数,立即执行函数也叫立即调用函数,通常它的写法是用(function(){…})()包 ...

  9. react-native启动页面设置,react-native-splash-screen

    用于解决iOS和Android启动白屏问题及简单的启动页面展示 下载 react-native-splash-screen yarn add react-native-splash-screen re ...

  10. PHP 字符串两边填充补零

    str_pad顾名思义这个函数是针对字符串来说的这个可以对指定的字符串填补任何其它的字符串 例如:str_pad(带填补的字符串,填补后的长度,填补字符串,填补位置) 其中填补后的长度必须是个正整数, ...