【转】Ubuntu网卡配置
一、网卡地址配置
Ubuntu的网络配置文件是:/etc/network/interfaces
1、以DHCP 方式配置网卡
auto eth0
iface eth0 inet dhcp
用sudo /etc/init.d/networking restart命令使网络设置生效
2、为网卡配置静态IP地址
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
sudo /etc/init.d/networking restart
3、设定第二个IP地址(虚拟IP地址)
sudo vi /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
address 192.168.1.101
netmask 255.255.0
gateway 192.168.1.1
sudo /etc/init.d/networking restart
4、设置主机名称(hostname)
使用下面的命令来查看当前主机的主机名称:
sudo /bin/hostname
使用下面的命令来设置当前的主机名称:
sudo /bin/hostname newname
5、配置DNS
(1) /etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是本机的静态查询
(2) /etc/resolv.conf
nameserver *.*.*.*
原文地址:http://blog.chinaunix.net/uid-656828-id-3098797.html
【转】Ubuntu网卡配置的更多相关文章
- ubuntu网卡配置及安装ssh服务
1.ubuntu网卡配置 1.查看网卡名称 ip a 2.进行编辑网卡配置文件 sudo vi /etc/network/interfaces 更改网卡配置文件添加内容修改内容如下:下面的enp0s3 ...
- Ubuntu网卡配置
目录 1.查看所有可用网卡 2.编辑配置文件 3.添加可用网卡信息 4.重启网络服务 5.查看网卡信息 1.查看所有可用网卡 $ ifconfig -a # -a display all interf ...
- 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 ...
随机推荐
- Android Service与Activity之间通信
主要分为: 通过Binder对象 通过broadcast(广播)的形式 Activity调用bindService (Intent service, ServiceConnection conn, i ...
- yum安装高版本mysql(5.5)
1.导入第三方源webtatic rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm 2.如果已安装低版本的mysql就删除 yum r ...
- JSP -- for循环按钮处理事件
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...
- ubuntu 装机及装机以后干的事情
一.装系统 下载ubuntu镜像 ubuntu 16.04 镜像下载(linux公社) 安装unetbootin (u盘启动盘制作工具) sudo apt-get install unetbootin ...
- FS210开发板上Qt4.7.0移植过程
作者:冯老师,华清远见嵌入式学院讲师. 1. 搭建Qt开发环境平台 1.开发环境:ubuntu 12.04 2.交叉编译链:arm-cortex_a8-linux-gnueabi 3.开发板:FS21 ...
- Linux任务调度命令(轻松管理Linux)
Linux任务调度其实就是让系统在某个时间执行某些命令或者程序,这样可以让管理员更加轻松地管理自己的Linux,当我刚了解到这个方法时,我的内心充满了无尽的欣喜,感觉Linux实在是太强大了. 下面我 ...
- jQuery $(document).ready()和window.onload
jQuery $(document).ready()和window.onload 根据ready()方法的API说明http://api.jquery.com/ready/. 这个方法接收一个func ...
- error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file or directory .
转载:http://www.eefocus.com/pengwr/blog/2012-02/235057_baf52.html 此时你可以locate libXXX.so.x 一下,查看系统里是否有该 ...
- Defining custom settings in Odoo
Unfortunately Odoo documentation doesn’t seem to include any information about adding new configurat ...
- easy_install - pip
easy_install 下载地址 解压,安装. python ez_setup.py pip 下载地址 解压,安装. python setup.py install 注意配置环境变量. Instal ...