Linux设置静态IP
2016-10-18 15:26
204 查看
我的环境:CentOS 6.5
按Insert键进入编辑模式
ONBOOT=yes 开机自启动
BOOTPROTO=static 静态ip
IPADDR=192.168.154.128 要设置的IP地址
NETMASK=255.255.255.0 子网掩码
GATEWAY=192.168.1.4 网关
按ESC键回到命令模式
按“shift + :”,输入wq保存。
service network start
1. 登录
以root用户登录2. 在终端中输入:vi /etc/sysconfig/network-scripts/ifcfg-eth0
(vi后面有个空格)按Insert键进入编辑模式
ONBOOT=yes 开机自启动
BOOTPROTO=static 静态ip
IPADDR=192.168.154.128 要设置的IP地址
NETMASK=255.255.255.0 子网掩码
GATEWAY=192.168.1.4 网关
按ESC键回到命令模式
按“shift + :”,输入wq保存。
3. 重启网络服务
service network stopservice network start
4. ping测试
相关文章推荐
- debian linux静态IP设置。
- Linux静态ip设置
- linux 静态ip设置教程
- Linux下设置静态IP和获取动态IP的方法
- Linux静态IP设置
- linux 静态ip 设置
- Linux下设置静态IP和获取动态IP的方法
- 详述Linux配置静态IP、设置DNS和主机名
- Linux下动态IP和静态IP的设置方法
- Linux静态IP设置
- Linux设置静态IP
- Ubuntu Linux系统下设置静态IP的方法
- linux 设置静态IP
- Linux下配置静态IP 设置DNS和主机名
- Linux静态IP设置
- 设置VMware中Linux的静态IP
- 详述Linux配置静态IP、设置DNS和主机名
- linux设置静态ip
- linux 静态ip设置shell版本
- 详述Linux配置静态IP、设置DNS和主机名