为什么会这样啊……试试 sudo systemctl start network-online.target 会不会报错?之后再 status 看看 active 了没?
离线
为什么会这样啊……试试 sudo systemctl start network-online.target 会不会报错?之后再 status 看看 active 了没?
没有报错,start一下就激活了,NetworkManager-wait-online.service 也启动了。。。
sudo systemctl start network-online.target
systemctl status network-online.target
● network-online.target - Network is Online
Loaded: loaded (/usr/lib/systemd/system/network-online.target; static)
Active: active since Thu 2025-02-27 22:46:03 CST; 5s ago
Invocation: f93b14be8d084658ba74e30ad7fdabce
Docs: man:systemd.special(7)
https://systemd.io/NETWORK_ONLINE
2月 27 22:46:03 archer systemd[1]: Reached target Network is Online.
❯ systemctl status NetworkManager-wait-online.service
● NetworkManager-wait-online.service - Network Manager Wait Online
Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; enabled; preset: disabled)
Drop-In: /etc/systemd/system/NetworkManager-wait-online.service.d
└─override.conf
Active: active (exited) since Thu 2025-02-27 22:46:03 CST; 2min 6s ago
Invocation: 01de6d86d5ed4a4b8a99f2a8cf14e1af
Docs: man:NetworkManager-wait-online.service(8)
Process: 29083 ExecStartPre=/bin/sh -c until ping -c1 baidu.com; do sleep 1; done; (code=exited, status=0/SUCCESS)
Process: 29085 ExecStart=/usr/bin/nm-online -s -q (code=exited, status=0/SUCCESS)
Main PID: 29085 (code=exited, status=0/SUCCESS)
Mem peak: 2.3M
CPU: 18ms
2月 27 22:46:03 archer systemd[1]: Starting Network Manager Wait Online...
2月 27 22:46:03 archer sh[29084]: PING baidu.com (39.156.66.10) 56(84) bytes of data.
2月 27 22:46:03 archer sh[29084]: 64 bytes from 39.156.66.10: icmp_seq=1 ttl=49 time=102 ms
2月 27 22:46:03 archer sh[29084]: --- baidu.com ping statistics ---
2月 27 22:46:03 archer sh[29084]: 1 packets transmitted, 1 received, 0% packet loss, time 0ms
2月 27 22:46:03 archer sh[29084]: rtt min/avg/max/mdev = 101.825/101.825/101.825/0.000 ms
2月 27 22:46:03 archer systemd[1]: Finished Network Manager Wait Online.
离线