|
5#
楼主 |
发表于 2020-5-12 09:25:01
|
只看该作者
要如何干掉networkmanager?是用systemctl吗?
我关掉NetworkManager
root@debian10:/home/toybrick# systemctl disable NetworkManager
Removed /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.
Removed /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
重启:
reboot
root@debian10:/home/toybrick# systemctl status NetworkManager
● NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; disabled; vendor
Active: inactive (dead)
Docs: man:NetworkManager(8)
lines 1-4/4 (END)
root@debian10:/home/toybrick# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.9.121 netmask 255.255.255.0 broadcast 192.168.9.255
inet6 fe80::36ba:9aff:fe6f:2985 prefixlen 64 scopeid 0x20<link>
ether 34:ba:9a:6f:29:85 txqueuelen 1000 (Ethernet)
RX packets 264 bytes 19837 (19.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54 bytes 7214 (7.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 24
eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 255.255.255.0 broadcast 0.0.0.0
ether 34:ba:9a:6f:29:85 txqueuelen 1000 (Ethernet)
device interrupt 24
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>
loop txqueuelen 1 (Local Loopback)
RX packets 68 bytes 4080 (3.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 68 bytes 4080 (3.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@debian10:/home/toybrick#
地址还是自动获取的,不是我配置的那个。
root@debian10:/home/toybrick# ps -elf | grep dhclient
5 S root 692 1 0 80 0 - 2260 poll_s 01:22 ? 00:00:00 /usr/sbin/dhclient -v -cf /var/lib/wicd/dhclient.conf eth0
0 S root 788 754 0 80 0 - 1177 pipe_w 01:24 ttyFIQ0 00:00:00 grep dhclient
root@debian10:/home/toybrick#
查看dhclient程序依然在运行,是不是哪里还没关好?
|
|