redhat8重启网卡服务Failed to restart network.service: Unit network.service not found.
1、问题
[root@localhost ~]# systemctl restart network
Failed to restart network.service: Unit network.service not found.
2、查看iP
[root@localhost ~]# ifconfig | head ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 //网卡名称 ether 00:0c:29:b2:81:9a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host>
3、重启网卡
[root@localhost ~]# nmcli c up ens160 //重启网卡
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkMa
[root@localhost ~]# ifconfig | head -n 5 ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 162.168.10.10 netmask 255.255.255.0 broadcast 162.168.10.255 inet6 fe80::87a8:d6e:7639:1b9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:b2:81:9a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B)
分类:
linux shell
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2020-06-26 linux系统安装bison,解决 These critical programs are missing or too old: bison compiler
2020-06-26 linux系统 binutils 的 安装,解决These critical programs are missing or too old: as GNU ld 的问题
2020-06-26 httpd-2.4.6-17.el7.x86_64: [Errno 256] No more mirrors to try 的解决方法
2020-06-26 linux 系统 如何 安装 python (python 3.8)