在Linux系统中,可以使用以下命令来查看IP配置:
- 使用
ifconfig
命令来查看网络接口的IP配置信息:
ifconfig
- 使用
ip addr show
命令来查看网络接口的IP配置信息:
ip addr show
- 使用
ip route show
命令来查看路由表信息,包括IP地址和子网掩码:
ip route show
- 使用
cat /etc/resolv.conf
命令来查看DNS服务器的IP配置信息:
cat /etc/resolv.conf
- 使用
hostname -I
命令来查看本机的IP地址:
hostname -I
注意:以上命令可能需要以root或管理员权限运行。