您现在的位置是:网站首页> 编程资料编程资料
linux命令行(文本模式)下配置网络_RedHat/Centos_操作系统_
2024-03-08
122人已围观
简介 linux命令行(文本模式)下配置网络_RedHat/Centos_操作系统_
除了通用的ifconfig外,对于Redhat/Fedora发行版,有专用的配置工具-netconfig。比较而言,netconfig可以设置IP获取方式(静态或者DHCP获取)等。 netconfig --help
Usage: netconfig [OPTION...]
--bootproto=(dhcp|bootp|none) Boot protocol to use
--gateway=STRING Network gateway
--ip=STRING IP address
--nameserver=STRING Nameserver
--netmask=STRING Netmask
--hostname=STRING Hostname
--domain=STRING Domain name
-d, --device=STRING Network device
--nodns No DNS lookups
--hwaddr=STRING Ethernet hardware address
--description=STRING Description of the device Help options:
-?, --help Show this help message
--usage Display brief usage message
实例一:设置网卡的DHCP模式自动获得IP [root@localhost ~]# netconfig -d eth0 --bootproto=dhcp
实例一:手动设置网卡的IP等 [root@localhost ~]# netconfig -d eth0 --ip=192.168.1.33 --netmask=255.255.255.0 --gateway=192.168.1.1
Usage: netconfig [OPTION...]
--bootproto=(dhcp|bootp|none) Boot protocol to use
--gateway=STRING Network gateway
--ip=STRING IP address
--nameserver=STRING Nameserver
--netmask=STRING Netmask
--hostname=STRING Hostname
--domain=STRING Domain name
-d, --device=STRING Network device
--nodns No DNS lookups
--hwaddr=STRING Ethernet hardware address
--description=STRING Description of the device Help options:
-?, --help Show this help message
--usage Display brief usage message
实例一:设置网卡的DHCP模式自动获得IP [root@localhost ~]# netconfig -d eth0 --bootproto=dhcp
实例一:手动设置网卡的IP等 [root@localhost ~]# netconfig -d eth0 --ip=192.168.1.33 --netmask=255.255.255.0 --gateway=192.168.1.1
相关内容
- LINUX 常见问题1000个详细解答_RedHat/Centos_操作系统_
- 我叫MT给力福利从天降_购买万能碎片得双倍_网络游戏_游戏攻略_
- 我叫mt紫卡掉落规律技巧分享_网络游戏_游戏攻略_
- 我叫MT五张公会本必练神卡全面解析_网络游戏_游戏攻略_
- lol神秘赠礼活动详情_lol神秘赠礼奖励说明_网络游戏_游戏攻略_
- 我叫mt娘子怎么获得 我叫mt娘子有用吗_网络游戏_游戏攻略_
- 我叫MT小伙伴升紫用什么材料卡_小伙伴材料卡实测_网络游戏_游戏攻略_
- cf狙击教学心得_cf八年狙击的经验技巧分享_网络游戏_游戏攻略_
- dnf新副本巨龙城进入方法_dnf新副本巨龙城怎么进入_网络游戏_游戏攻略_
- 九阴真经魅影剑法 视频攻略_网络游戏_游戏攻略_
