Questions tagged [nmcli]

Questions about the command-line interface for NetworkManager. The command-line interface is available at least from Ubuntu 12.04.

nmcli is provided by network-manager package in Ubuntu.

More information:

99 questions
25
votes
2 answers

Set static IP on Ubuntu Core

I'm new to Ubuntu Core. On first login I selected the option: Will use DHCP for IPv4 Now I'd like to change my machine to use a static IP to be easier to log in remotely. I ran sudo console-conf on the machine (over ssh, if relevant). This gives…
tsteiner
  • 806
16
votes
3 answers

How to toggle NetworkManager's "Use this connection only for resources on its network" option via command line

At my work we have some test machines that we run scripts on via ssh. During the test we want to only have the machines access the local network through their Ethernet connection, but then would like to have them be able to access the Internet…
user563202
15
votes
5 answers

How can I connect to a specific BSSID?

There are multiple wireless networks available with same SSID. I am looking for a solution to connect to a specific one (by BSSID). nmcli con up ifname ap seems good, but, unfortunately, it's not working. It just connects back to the original…
Krisz
  • 285
  • 1
  • 4
  • 10
14
votes
1 answer

Get a list of network manager network connections with Bash?

I want to get a list of Ethernet and wireless connections from the terminal. Those connections are listed in NetworkManager's GUI and include info like the connection's SSID. The next step is to delete unwanted connections.
Yurij
  • 605
11
votes
4 answers

Why is nmcli not configuring device?

I'm new to nmcli and trying to figure out how to create an eth0 connection. sudo nmcli con prints the following: NAME UUID TYPE DEVICE MyWlan0 ... wifi wlan0 MyEth0 ... ethernet -- No matter what command I…
Magnus
  • 293
11
votes
7 answers

nmcli the WiFi network could not be found

I'm running a headless device that I want to connect to wifi(it's currently on ethernet), so I'm using nmcli. I scan for connections with the following: sudo nmcli dev wifi rescan sudo nmcli dev wifi list and the WiFi network I want is at 95%…
user8292439
  • 3,878
  • 7
  • 32
  • 57
10
votes
2 answers

How to add a wifi connection if I'm not within range

I'm refurbishing laptops (Ubuntu 20.04) to hand out to kids as part of combating digital exclusion during COVID-19. Obviously I don't want to give them sudo access, however, I can't enter their houses to get onto WiFi. How do I add a new connection…
10
votes
2 answers

What is the correct way to restart nmcli interface remotely?

On Ubuntu 18.04, NetworkManager is used. After modifying the configuration of an interface remotely, using the NetworkManager CLI. Example: nmcli connection modify (interface_profile_name) ipv4.addresses (XXX.XXX.XXX.XXX/XX) How can I make it taken…
Serfoo
  • 101
7
votes
1 answer

Turn on interface using nmcli

I would like to turn my interface on, using nmcli command. Command nmcli device connect wlp2s0 does not work for me, it gives me this error : Error: Failed to add/activate new connection: A 'wireless' setting is required if no AP path was…
John Ronald
  • 2,526
6
votes
0 answers

Difference between iwconfig and nmcli

When I run the command nmcli dev wifi in my console I get the list of wifi networks, including the one I'm connected to * SSID MODE CHAN RATE SIGNAL BARS SECURITY * eduroam Infra 36 54 Mbit/s 63 …
5
votes
2 answers

How do I to set the DNS server for a device using nmcli?

How do I set the DNS server to be 8.8.8.8 and 8.8.4.4 through the CLI with nmcli? $ nmcli device show eno1 GENERAL.DEVICE: eno1 GENERAL.TYPE: ethernet GENERAL.HWADDR: …
Thufir
  • 4,631
5
votes
1 answer

How can I force a connection to a specific WiFi network using nmcli?

NetworkManager is often extremely slow to scan and detect new networks with my wireless card (rtl8xxxu driver). Using the Network Manager GUI I can "force" a connection to a specific wireless network using "Connect to a Hidden Network". Even if…
Dan
  • 671
5
votes
1 answer

How to connect to a WPA2 enterprise with nmcli in a non interactive mode?

I am able to connect with nmcli to a WPA enterprise network only in an interactive mode launched by nmcli con edit id MYNAME nmcli refuses to change 802-1x values while not in edit mode: nmcli c modify MYNAME wifi-sec.key-mgmt wpa-eap Error:…
user123456
  • 2,478
5
votes
4 answers

wifi still sleeping when resume

When I put my desktop in hybernate and then put it back on the wifi is gone. It is simular to the problem described here. But to fix it you have to run a command sudo nmcli nm sleep false. But the nm thing is not working anymore. It has been…
Tristan
  • 185
5
votes
1 answer

NetworkManager vpn con fails when no gateway

When I try to activate an OpenVPN connection using the network manager command: nmcli connection up vpn_conn I get the following error: Error: Connection activation failed: Could not find source connection. I only get the error when there is no…
MoonManT
  • 725
1
2 3 4 5 6 7