我正在尝试在 ubuntu 中创建热点,因此我需要禁用 wifi。尝试该命令时,nmcli radio wifi off
它返回消息bash: nmcli: command not found
。有没有办法在 ubuntu 16.04 上安装 nmcli?
答案1
/usr/bin/nmcli
是该包的一部分network-manager
。
w3@aardvark:~(0)$ type -p nmcli
/usr/bin/nmcli
w3@aardvark:~(0)$ dpkg -S /usr/bin/nmcli
network-manager: /usr/bin/nmcli
# Read `man apt-cache`. What depends on network-manager?
w3@aardvark:~(0)$ apt-cache rdepends network-manager
network-manager
Reverse Depends:
nplan
network-manager-gnome
gce-startup-scripts
gce-daemon
cockpit-networkmanager
ubuntu-mate-desktop
ubuntu-mate-core
ubuntu-mate-cloudtop
ubuntu-gnome-desktop
|nplan
network-manager-openconnect
network-manager-openconnect
libpurple0
evolution
connman
resolvconf
network-manager-gnome
wader-core
ubuntu-touch
ubuntu-push-client
ubuntu-mate-desktop
ubuntu-mate-core
ubuntu-mate-cloudtop
ubuntu-gnome-desktop
tlp-rdw
sugar-session
sugar-presence-service-0.88
sugar-presence-service
|sugar-presence-service
python-networkmanager
python-jarabe
plinth
plasma-nm
network-manager-strongswan
|modem-manager-gui
ppp
mate-gnome-main-menu-applet
mailnag
liferea
libpurple0
indicator-network-tools
indicator-network
gajim
freedombox-setup
evolution
connman
resolvconf
modemmanager
plainbox-provider-resource-generic
network-manager-gnome
# Read `man apt-cache`. What does network-manager depend on?
w3@aardvark:~(0)$ apt-cache depends network-manager
network-manager
Depends: libbluetooth3
Depends: libc6
Depends: libglib2.0-0
Depends: libgnutls30
Depends: libgudev-1.0-0
Depends: libmm-glib0
Depends: libndp0
Depends: libnewt0.52
Depends: libnl-3-200
Depends: libnm0
Depends: libpolkit-agent-1-0
Depends: libpolkit-gobject-1-0
Depends: libreadline6
Depends: libsoup2.4-1
Depends: libsystemd0
Depends: libuuid1
Depends: init-system-helpers
Depends: lsb-base
Depends: dnsmasq-base
Depends: wpasupplicant
wpasupplicant:i386
Depends: dbus
dbus:i386
Depends: udev
udev:i386
Depends: adduser
Depends: isc-dhcp-client
Depends: libpam-systemd
Depends: policykit-1
policykit-1:i386
Conflicts: connman
Breaks: network-manager-gnome
Breaks: <network-manager-kde>
Breaks: network-manager-openconnect
Breaks: network-manager-openvpn
Breaks: network-manager-pptp
Breaks: network-manager-vpnc
Breaks: <plasma-widget-networkmanagement>
Breaks: ppp
Recommends: ppp
Recommends: iptables
Recommends: modemmanager
wader-core
Recommends: crda
crda:i386
Recommends: iputils-arping
Recommends: network-manager-pptp
|Recommends: network-manager-gnome
|Recommends: <plasma-widget-networkmanagement>
Recommends: plasma-nm
Suggests: avahi-autoipd
Suggests: python
答案2
nmcli
是其一部分network-manager
因此,安装它的一种方法是在终端中使用此命令
sudo apt-get install network-manager
安装后它将找到nmcli
一个命令。