root@temple-102:~# ifconfig
eno1 Link encap:Ethernet HWaddr 0c:c4:7a:e6:49:74
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:fb220000-fb23ffff eno2 Link encap:Ethernet HWaddr 0c:c4:7a:e6:49:75
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ec4:7aff:fee6:4975/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:131 errors:0 dropped:0 overruns:0 frame:0
TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11603 (11.6 KB) TX bytes:13765 (13.7 KB)
Memory:fb200000-fb21ffff lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:170 errors:0 dropped:0 overruns:0 frame:0
TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12488 (12.4 KB) TX bytes:12488 (12.4 KB)

  记住网卡名字 eno2(根据实际情况不一致)

root@temple-102:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback auto eno2
iface eno2 inet static
address 192.168.1.102
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameserver 8.8.8.8

  

root@temple-102:~# /etc/init.d/networking restart
[ ok ] Restarting networking (via systemctl): networking.service.

可能会不生效, 重启电脑生效!

Ubuntu16.4 修改静态ip地址的更多相关文章

  1. Ubuntu16.04修改静态ip地址

    https://blog.csdn.net/mdw5521/article/details/79270035

  2. centos修改静态Ip地址

    centos修改静态Ip地址 待办 昨天待办 https://blog.csdn.net/johnnycode/article/details/40624403 centos修改静态ip地址

  3. Ubuntu16.04配置静态IP地址

    ubuntu如何设置静态IP? 设置静态IP 1.编辑/etc/network/interfaces文件: # This file describes the network interfaces a ...

  4. Ubuntu-12.04-server 配置修改静态 IP地址

    前几天在装Ubuntu 12.04 Server版系统的服务器时IP地址写错了,导致服务器不能上网,今天重新修改了一下IP地址,这里做一个总结. 1.配置静态IP地址 sudo vi /etc/net ...

  5. CentOS7 修改静态IP地址

    Ip配置文件在/etc/sysconfig/network-scripts文件夹下,查找该文件的方法为: [root@localhost ~]# ll /etc/sysconfig/network-s ...

  6. linux -- Ubuntu修改静态IP地址重启后无法上网的解决

    ubuntu设置静态IP地址后,上不了网 文章中也提到,如果是在/etc/resolv.conf添加DNS,由于Ubuntu 有一个 resolvconf 服务,如果重启它,那么 /etc/resol ...

  7. 如何修改静态IP地址和动态IP地址

    打开控制面板,一般在电脑的菜单栏能找到,win8和win10可以使用快捷键(win键+X键),找不到的朋友可以搜索一下.   进入到网络和共享中心,点击更改适配器设置.   这里显示的是电脑所以的网络 ...

  8. 软件——Ubuntu16.04设置静态ip地址

    1.获取网卡名称 在命令行输入ifconfig -a 2.修改网卡配置文件 sudo vim /etc/network/interfaces 加上下面的配置,IP地址可以成适合你的 auto eth0 ...

  9. centos7修改静态ip地址

    今天逛园的时候突然发现这篇有关网络参数修改的文章写的很好,简单又使用,格式也很好的,所以就引用过来了. http://www.cnblogs.com/hongdada/p/6666932.html

随机推荐

  1. 【状压DP】【CF8C】 Looking for Order

    传送门 Description 给你n个点,每次可以从起点到最多两个点然后回到起点.求经过每个点最少一次的最短欧氏距离和是多少 Input 第一行是起点的坐标 第二行是点的个数\(n\) 下面\(n\ ...

  2. tp查询中2个表格中字段,比较大小

    $where['_string'] = '`has_number` < `number`';//~~~注意:这里`不能丢了: $coupon_flag = $coupon->where($ ...

  3. (转)javap 指令集

    栈和局部变量操作将常量压入栈的指令aconst_null 将null对象引用压入栈iconst_m1 将int类型常量-1压入栈iconst_0 将int类型常量0压入栈iconst_1 将int类型 ...

  4. Ajax-更新

    ajax是与服务器进行(异步/同步)交互的技术之一交互就是对服务器一种访问ajax对服务器进行交互时页面不刷新ajax的语言载体是JS 比如我在百度输入个东西 自动弹出信息像和一些搜索字体相关的页面标 ...

  5. RBAC权限系统设计

    序言 RBAC表结构 用户表 角色表 权限表 用户角色(关系)表 角色权限(关系)表 资料 https://blog.csdn.net/ShrMuscles/article/details/80532 ...

  6. 引用类型 ( 对象定义 )——Function 类型

    本文地址:http://www.cnblogs.com/veinyin/p/7607798.html  函数实际上是对象,也具有属性和方法,函数名实际上是指向函数对象的指针 function sum( ...

  7. 2017ACM暑期多校联合训练 - Team 1 1003 HDU 6035 Colorful Tree (dfs)

    题目链接 Problem Description There is a tree with n nodes, each of which has a type of color represented ...

  8. 5、Linux操作系统介绍

    1操作系统的作用·是现代计算机系统中最基本和最重要的系统软件·是配置在计算机硬件上的第一层软件,是对硬件系统的首次扩展·主要作用是管理好硬件设备,并为用户和应用程序提供一个简单的接口,以便于使用·而其 ...

  9. idea 控制台乱码

    第一步:修改intellij idea配置文件: 找到intellij idea安装目录,bin文件夹下面idea64.exe.vmoptions和idea.exe.vmoptions这两个文件,分别 ...

  10. perl6 一个猜测密码的注入

    use HTTP::UserAgent; my $ua = HTTP::UserAgent.new; my $r = HTTP::Request.new; my $c = HTTP::Cookies. ...