惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
C
Check Point Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
腾讯CDC
GbyAI
GbyAI
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件

夜行人

回家路上 第一期的直播演示项目 震动检测器 正能量 在线参观CodeLab Neverland 发布 CodeLab Adapter 3.3.1 DynamicTable 之 纸糊方向盘 CodeLab DynamicTable: 一个可实施的技术方案 CodeLab Insight 发布 Alpha 版 情人节 Home Assistant 周报 && IoT 周报 (02) Joplin: 关注隐私的 Evernote 开源替代软件 浏览器的未来与 Web 传感器 Home Assistant 周报 && IoT 周报 (01) 百宝箱(01) 论自由 介绍 WebThings Home Assistant 周报 && iot 周报 (00) 百宝箱(00) 毛姆读书心得 传世之作 周末徒步 CodeLab Adapter ❤️ Jupyter/Python 航班 躲雨 夏令营途中 [译]思想--作为一种技术 The future of coding 美国之行 三门问题的程序模拟
命令行网络配置
2014-07-08 · via 夜行人

参考这个博客

##通过配置文件配置

###1)配置IP网关:sudo gedit /etc/network/interfaces 里面添加

  • dhcp的
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
  • 静态IP的
auto lo
iface lo inet loopback
#上面的是回环
#网卡eth0的配置
auto eth0
#staic 静态IP
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.1
#network 192.168.3.0  
#broadcast 192.168.3.255 
#后面两条是网络号和广播号,这个可以由其它信息计算,因此无需设置

###2)配置DNS: sudo gedit /etc/resolv.conf

nameserver 202.107.117.11

###3)主机名:sudo gedit /etc/hostname 里面输入主机名。默认有个主机名,因此这个不是必须的。

###4)重启网络:sudo /etc/init.d/networking restart 也可以重启网卡:

sudo ifconfig eth0 down 
sudo ifconfig eth0 up

重启网卡对别的网卡无影响,更推荐一些。

文章作者 种瓜

上次更新 2014-07-08