操作系统 
首页 > 操作系统 > 浏览文章

linux命令行(文本模式)下配置网络

(编辑:jimmy 日期: 2024/10/3 浏览:3 次 )
除了通用的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
 
上一篇:Linux系统下安装Intel千兆网卡驱动
下一篇:Linux操作系统下提高PHP性能的工具APC
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。