Setting up a static IP address in Ubuntu
2024-10-19 23:36:50
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
最新文章
- MySQL学习笔记三:库和表的管理
- mongo3.2
- salesforce 零基础学习(十八)WorkFlow介绍及用法
- 64位centos 下编译 hadoop 2.6.0 源码
- LeetCode340 Longest Substring with At Most K Distinct Characters
- eclipse 切换svn账号
- myeclipse 10 载入新的项目报错Cannot return from outside a function or method
- Ant build.xml 批量打渠道包回顾!打第三方jar包总结
- Aop编程--注解与xml的实现
- 用php+mysql+ajax实现淘宝客服或阿里旺旺聊天功能 之 后台页面
- BZOJ 4513: [Sdoi2016]储能表 [数位DP !]
- 【NOIP 2017】宝藏
- 如何在ubuntu开启ssh服务-使 SecureCRT远程登录
- 原生ajax可变参数post
- mac crontab调用python时出现ImportError: No module named XXX的问题
- Python知识点整理,基础3 - 字典操作
- php 安装 phpredis 扩展
- vue axios的使用
- 20155327 2016-2017-4 《Java程序设计》第6周学习总结
- mongodb3.4.15集群搭建
热门文章
- JBoss 系列一 O O:Maven jBPM 6 集成演示样例
- Informatica 常用组件Source Qualifier之八 会话前和会话后 SQL
- Javascript中的Array(数组) 、{}(映射) 与JSON解析
- UVA 10012 How Big Is It?(暴力枚举)
- go语言基础之切片做函数参数
- 基于jQuery的Cookie操作插件--简单而又没有兼容性问题!
- 同一页面的不同Iframe获取数据
- SpringBoot四大神器之Starter
- Python批量处理CSV文件
- shell常用调试方法