Linux如何修改网卡ip地址!
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
Linux如何修改网卡ip地址!
1.临时修改(重启服务或者重启系统后失效):
ifconfig eth0 192.168.1.1 netmask 255.255.255.0
缩略:ifconfig eth0 192.168.1.1
(eth0是第一个网卡,eth1是第二个)
2 永久修改(需要再配置文件里修改):
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 //网卡名字 不用改
BOOTPROTO=static //默认为dhcp 修改为static
IPADDR=x.x.x.x //ip 地址
NETMASK=255.255.255.0 //子网掩码
GATEWAY=x.x.x.1 //网关地址
修改完毕后保存退出,重启网卡服务。
service network restart 命令重启网络
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐

所有评论(0)