sudo gedit /etc/network/interfaces

Change the line iface eth0 inet dhcp to iface eth0 inet static and add the following just below it:

address 192.168.1.100 (IP address of what you want your Ubuntu machine to be)
netmask 255.255.255.0
(Default mask which in this case is the default class c subnet)
gateway 192.168.1.1  
(Typically your router’s IP address)
network 192.168.1.0 
(The network that this machine is running on)
broadcast 192.168.1.255
 (A message that is sent to all out
network-attached hosts to essentially find a specific address. You
also receive them from other hosts)
dns-nameservers 192.168.1.1
 (DNS or Domain Name Server used for responding to queries when you are searching for a website)

sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start

Setting up a static IP address in Ubuntu的更多相关文章

  1. 给ubuntu设置静态ip —— How to set static IP Address in Ubuntu Server 16.04

    原文: http://www.configserverfirewall.com/ubuntu-linux/ubuntu-set-static-ip-address/ ----------------- ...

  2. Config Static IP Address manually in Ubuntu

    The process of the configuration of static IP address in Ubuntu is as follows: ``` $ sudo vim /etc/n ...

  3. Ubuntu setup Static IP Address

    Change Ubuntu Server from DHCP to a Static IP Address If the Ubuntu Server installer has set your se ...

  4. How to configure a static IP address on CentOS 7(CentOS7静态IP地址设置)

    Question: On CentOS 7, I want to switch from DHCP to static IP address configuration with one of my ...

  5. ubuntu使用git的时:Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.

    1:问题现象: hlp@hlp:~/code/github_code/catch_imooc1$ git push origin master Warning: Permanently added t ...

  6. 如何在没有显示器的情况下,查看 Raspberry Pi 3的 IP 信息(Raspberry Pi 3 ,IP Address)

    1. 如何在没有显示器的情况下,查看 Raspberry Pi 3的 IP 信息(Raspberry Pi 3 ,IP Address) 1 IP Address Any device connect ...

  7. Linux主流发行版本配置IP总结(Ubuntu、CentOS、Redhat、Suse)

    我们先了解下IP的概念 IP地址简介 电脑连接互联网的必要条件:IP地址+子网掩码+网关+DNS IP地址是上网的唯一标识 - IPv4地址分类: IPv4地址分为A-E共计5类地址,其中A.B.C是 ...

  8. MySQL [Warning]: IP address 'xxxx' could not be resolved: Name or service not known

    MySQL的error log 出现大量的 DNS反解析错误. DNS解析是指,将 域名解析成ip地址: DNS反解析是指,将IP地址反解析成域名: Version: MySQL Community ...

  9. Windows Store APP- C# to get IP Address

    using Windows.Networking.Connectivity; public String GetIPString() { String ipString = String.Empty; ...

随机推荐

  1. 信号处理篇alarm ferror kill mkfifo pause pclose perror pipe popen sigaction sigaddset sigdelset sigemptyset signal sleep strerror

    alarm(设置信号传送闹钟) 相关函数 signal,sleep 表头文件 #include<unistd.h> 定义函数 unsigned int alarm(unsigned int ...

  2. ActiveMQ使用示例之Queue

    我们使用ActiveMQ为大家实现一种点对点的消息模型. 开发时候,要将apache-activemq-5.12.0-bin.zip解压缩后里面的activemq-all-5.12.0.jar包加入到 ...

  3. OpenCV教程(41) 人脸特征检测

          在OpenCV中,自带着Harr分类器人脸特征训练的文件,利用这些文件,我们可以很方面的进行人脸,眼睛,鼻子,表情等的检测.      人脸特征文件目录: ../opencv2.46/op ...

  4. Informatica 常用组件Lookup之九 配置未连接的查找转换

    在映射中,未连接的查找转换与管道是分开的.您可以使用 :LKP 引用限定符编写表达式以调用其它转换中的查找.未连接查找的常用用法包括: 测试表达式中某个查找的结果 基于查找结果过滤行 基于查找的结果将 ...

  5. 第一章 Java代码执行流程

    说明:本文主要参考自<分布式Java应用:基础与实践> 1.Java代码执行流程 第一步:*.java-->*.class(编译期) 第二步:从*.class文件将其中的内容加载到内 ...

  6. 理清Processor, Processor Sockets, Processor Cores, Logical Processors, Hyperthreading这些概念吧

    如果你只知道CPU这么一个概念,那么是无法理解CPU的拓扑的.事实上,在NUMA架构下,CPU的概念从大到小依次是:Node.Socket.Core.Logical Processor. 随着多核技术 ...

  7. Android -- 文件扫描

    启动MediaScanner服务,扫描媒体文件,程序通过发送下面的Intent启动MediaScanner服务. 扫描指定文件 public void scanFile(Context ctx, St ...

  8. UVA 11464 Even Parity (独特思路)

    题意:有一个n*n的01矩阵,任务是把尽可能少的0变成1,使得每个元素的上.下.左.右元素之和为偶数. 思路:很容易想到的思路是枚举每个点是0还是1,因为n<=15,复杂度就是2^225显然TL ...

  9. eclipse全屏模式

  10. 使用sed进行文字替换

    范式: sed -i "s/查找内容/替换后内容/g" `grep 查找内容 -rl 查找开始路径` 例子: #sed -i "s/abc/ABC/g" `gr ...