查询ubuntu的ip方法

命令如下

bash 复制代码
#这个命令比较详细
ip addr show enp1s0
#enp1s0是网卡名

#这个也详细
nmcli device show enp1s0

如果发现同个网卡出现多个ip,则可以删除其中一个ip

bash 复制代码
sudo ip addr del 192.168.1.80/24 dev enp1s0

重启网络管理

bash 复制代码
sudo systemctl restart NetworkManager

查询所有网卡,包括未激活的网卡名

bash 复制代码
ifconfig -a
相关推荐
LSG_Dawn1 天前
XBOX360 kinect + ROS2_humble
ubuntu·深度相机
jing.wang_20251 天前
NVIDIA CUDA C++编程环境搭建--Windows + Ubuntu 22.04
c++·windows·ubuntu·gpu算力
黑白园1 天前
个人台式机VMware 15及Ubuntu 16.04.5卸载以及VMware 16.2.3及Ubuntu 24.04.4安装
linux·ubuntu
想你依然心痛2 天前
从监控数据到告警管理:Prometheus与Alertmanager部署实战
ubuntu·prometheus·内网穿透·系统监控·cpolar·告警管理
黑白园2 天前
解决服务器拒绝连接导致ubuntu镜像无法下载问题 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/
ubuntu
yangpan0112 天前
ubuntu输入法安装及选择
linux·运维·ubuntu
强里秋千墙外道2 天前
Ubuntu 开机 Kernel Panic:HWE 内核升级失败 + NVIDIA DKMS 踩坑实录
linux·运维·ubuntu
啊啊啊迈 旋棍3 天前
【译】TypeScript 7 测试版已在 Visual Studio 2026 18.6 Insiders 3 中默认启用
ubuntu·typescript·visual studio
Eloudy3 天前
ubuntu 22.04安装 cuda 12.8.2
linux·运维·ubuntu
接针3 天前
Pycharm远程连接Ubuntu的conda环境
ubuntu·pycharm·conda