Linux网络配置
来源:互联网 发布:淘宝热卖排行 编辑:程序博客网 时间:2024/06/05 17:23
IP地址的分类:
查看网络地址和配置:
ifconfig -a
临时配置IP地址:
修改IP地址:sudo ifconfig eth0 192.168.2.123
动态获取IP地址:sudo dhclient eth0
删除iP地址:sudo dhclient eth0 -r
永久配置IP地址:
动态获取:
第一步:配IP
sudo vi /etc/network/interfaces
编辑interfaces:
auto lo
iface lo inet loopback
auto eht0
iface eth0 inet dhcp
第二步:配置DNS
sudo vi /etc/resolv.conf
编辑resolv.comf:
namesever : 192.168.2.1
namesever : 8.8.8.8
namesever : 114.114.114.114
第三步:重启网络服务
sudo /etc/init.d/networking restart
静态配置:
第一步:配IP
sudo vi /etc/network/interfaces
编辑interfaces:
auto lo
iface lo inet loopback
auto eht0
iface eth0 inet static
address : 192.168.2.36
netmask : 255.255.255.0
geteway : 192.168.2.1
网卡的开启:
关:sudo ifconfig eth0 down
开:sudo ifconfig eth0 up
查询当前路由信息:
netatat -r
查看网络状态:
netstat -i
查看网址对应的IP地址:
nslookup www.baidu.com
1 0
- 网络 linux网络配置
- linux配置网络配置
- Linux网络基本网络配置
- 【网络】Linux网络相关配置
- Linux网络基本网络配置
- linux网络配置基础
- Linux网络配置
- 手动配置linux网络
- linux 网络配置
- linux 网络配置
- Linux网络配置
- Linux网络环境配置
- LINUX网络配置
- Linux 网络配置ifconfig
- linux网络配置
- Linux 网络配置
- linux 网络配置
- redhat linux网络配置
- inner join, left outer join, right outer join
- app 欢迎界面
- Snackbar提示框
- Google FlatBuffers使用教程
- Spring Session入门(包含示例项目)
- Linux网络配置
- Spring Boot实战之Redis缓存登录验证码
- 面经总结
- 在Android原生中嵌入React Native,进而React Native调用原生
- 删除主数据的步骤
- php图像处理大全
- Codeforces 208A Dubstep
- WPF向指定窗口发送键盘指令
- linux笔记