linux下命令行配置网络IP,增加用户,配置网关,修改最大共享内存参数,停服务,启动服务,多用户切换单用

还有修改新增用户环境变量,急求

/* 使用ifconfig命令配置并查看网络接口情况 */

//配置eth0的IP,同时激活设备

# ifconfig eth0 192.168.168.119 netmask 255.255.255.0 up

//配置eth0别名设备 eth0:1 的IP,并添加路由

# ifconfig eth0:1 192.168.168.110

# route add –host 192.168.168.110 dev eth0:1

//激活(禁用)设备

# ifconfig eth0:1 up(down)

//查看所有(指定)网络接口配置

# ifconfig (eth0)

/* 使用route 命令配置路由表 */

//添加到主机路由

# route add –host 192.168.168.110 dev eth0:1

# route add –host 192.168.168.119 gw 192.168.168.1

//添加到网络的路由

# route add –net IP netmask MASK eth0

# route add –net IP netmask MASK gw IP

# route add –net IP/24 eth1

//添加默认网关

# route add default gw IP

//删除路由

# route del –host 192.168.168.110 dev eth0:1
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-07-13
ifconfig
useradd
service * start|stop|reload
相似回答