#
未分类 2023-03-28

linux常用命令——网络管理篇

By 拾光 3 Views 2 MIN READ 0 Comments


systemctl restart network   # 重启网卡,当更新网卡配置时需要
ifconfig | less # 查看网络配置信息,当网卡较多的时候 加上 less 是比较有用的
ifconfig eth0 up    # 启用 eth0
ifconfig eth0 down  # 关闭 eth0
ifconfig eth0 add 192.168.1.2 netmask 255.255.255.0 # 给 eth0 设置 IP地址,推荐直接修改配置文件 /etc/sysconfig/network-script/ 
route add default gw 192.168.1.1    # 设置默认网关



本文由 拾光 原创

采用 CC BY-NC-SA 4.0 协议进行许可

转载请注明出处:https://timebaoku.online/index.php/archives/16/

TAGS: 无标签

YOU MAY ALSO LIKE

  • 暂无相关推荐,看看别的吧。

0 COMMENTS

LEAVE A REPLY