zhaolyjob

1.ifconfig

  如果找不到ifconfig需要安装 net-tools 

 yum install net-tools  或者 apt install net-tools

 

 

 

 2.hostname

hostname -I

 

 

 3.ip addr

ip addr  或者   ip addr show  或者  ip a

 

 

  4.curl 

apt install curl    安装程序

curl ifconfig.me    查看本地出口的公网地址

 

 

 

 5.ip 路由

ip route get 8.8.8.8  

 

 

 

 6.网卡的配置文件

 

centos

[root@localhost network-scripts]# pwd         
/etc/sysconfig/network-scripts

ubuntu

17以前的版本 目录/etc/network/interfaces里配置IP地址
17以后目录   配置写在/etc/netplan/01-netcfg.yaml

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2021-05-03
  • 2022-01-01
  • 2022-01-01
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2021-09-24
  • 2021-12-12
  • 2022-01-01
  • 2021-12-22
  • 2021-08-16
  • 2022-01-01
相关资源
相似解决方案