Ubuntu网卡配置
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网卡配置的更多相关文章
- ubuntu网卡配置及安装ssh服务
1.ubuntu网卡配置 1.查看网卡名称 ip a 2.进行编辑网卡配置文件 sudo vi /etc/network/interfaces 更改网卡配置文件添加内容修改内容如下:下面的enp0s3 ...
- 【转】Ubuntu网卡配置
一.网卡地址配置Ubuntu的网络配置文件是:/etc/network/interfaces1.以DHCP 方式配置网卡 auto eth0 iface eth0 inet dhcp用sudo ...
- linux ubuntu 网卡配置---固定IP
需要修改/etc/network/interfaces和/etc/resolvconf/resolv.conf.d/base两个文件. 1) /etc/network/interfaces文件: 首先 ...
- ubuntu 网卡配置
- ubuntu 14.04网卡配置以及关闭防火墙
一.Ubuntu网卡配置如下: 在文件/etc/network/interfaces中进行以下配置 auto lo iface lo inet lookback auto eth0 iface eth ...
- ubuntu下为单个网卡配置多个ip
参考文档: https://www.jb51.net/os/Ubuntu/418951.html https://blog.csdn.net/ying1989920/article/details/4 ...
- 【Linux】ubuntu或linux网卡配置/etc/network/interfaces
转自:http://gfrog.net/2008/01/config-file-in-debian-interfaces-1/ 青蛙准备写一个系列文章,介绍一些Debian/Ubuntu里面常用的 ...
- 【转】ubuntu或linux网卡配置/etc/network/interfaces
转自:https://www.cnblogs.com/qiuxiangmuyu/p/6343841.html 青蛙准备写一个系列文章,介绍一些Debian/Ubuntu里面常用的配置文件.当然,Lin ...
- Ubuntu 为网卡配置静态IP地址
为网卡配置静态IP地址编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primar ...
随机推荐
- mysql 5.7主从库复制设置
先要修改配置文件,重启mysql服务 log-bin= mysql-binlog # 打开二进制日志 ,最好放在不同的硬盘上,减小 IO 消耗 expire_logs_day= # 设置二进制日志保存 ...
- C# DataGirdview手动添加数据,导出txt文件并自动对齐
//DataGirdview手动添加数据 private void btnDataGirdView_Click(object sender,EventArgs e) { dataGridV ...
- Linux线程池的实现
线程池的实现 1:自定义封装的条件变量 //condition.h #ifndef _CONDITION_H_ #define _CONDITION_H_ #include <pthread.h ...
- tcp粘包解决
import socket import hashlib import subprocess import struct phone = socket.socket(socket.AF_INET,so ...
- 《Linux 性能及调优指南》3.2 CPU瓶颈
翻译:飞哥 ( http://hi.baidu.com/imlidapeng ) 版权所有,尊重他人劳动成果,转载时请注明作者和原始出处及本声明. 原文名称:<Linux Performance ...
- 把自己的代码发布到npm(npm publish)
写了代码如何发布到npm包? 示例 demo1 demo2 1.注册npm账号 在npm官网注册https://www.npmjs.com/注意邮箱要验证,会发送验证链接到你的注册邮箱,没有验证的话是 ...
- 关于微信小程序更新内容后手机上不能及时显示的办法
这几天一直在做微信小程序的二次开发,每天都要发布程序,但是发布之后微信上查看小程序和以前的一模一样,丝毫没有改变,但是我再本地上却改变了,而且没有开的不校验合法域名那个.这是为啥呢????? 这是跟小 ...
- spring配置和下载
步骤一:下载 Spring 的开发包: 官网:http://spring.io/ 下 载 地 址 : http://repo.springsource.org/libs-release-local/o ...
- Freemarker入门
Freemarker入门 工程引入依赖 <dependency> <groupId>org.freemarker</groupId> <artifactId& ...
- Spring MVC 学习笔记12 —— SpringMVC+Hibernate开发(1)依赖包搭建
Spring MVC 学习笔记12 -- SpringMVC+Hibernate开发(1)依赖包搭建 用Hibernate帮助建立SpringMVC与数据库之间的联系,通过配置DAO层,Service ...