Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
353 views
On my Ubuntu-based distro (Linux Lite), how to auto delete all network connections, disable Wi-Fi and networking as part of booting process?
My end goal here is to have no saved network connections, no enabled Wi-Fi or networking each time I boot up my computer, so that I have to go through a sequence of steps in order to access internet. The purpose is to moderate my sceen behavior. My current way is through creating a script that uses...
My end goal here is to have no saved network connections, no enabled Wi-Fi or networking each time I boot up my computer, so that I have to go through a sequence of steps in order to access internet. The purpose is to moderate my sceen behavior. My current way is through creating a script that uses 'nmcli' and run at startup using crontab's @reboot. But It's not working. Here is the script
#!/bin/bash

# this script disables wifi and networking

echo 'Deleting all existing connections...'
# nmcli is a command-line interface for networkmanager
# 'nmcli connection delete' -> simply deletes a connection by ID, UUID or others
# we use 'nmcli connection show' along with some filter to extract UUIDs for all conections
# TODO enable deletion of a particular connection
#connections_list=$(nmcli connection show | grep -oP '\s(\S+-\S+-\S+-\S+-\S+)\s')
#for connection in "$connections_list"; do 
    #nmcli connection show "$connection"
    #if (($? != 0)); then 
        #echo "something went wrong while deleting connection $connection" >&2
        #exit 1
    #fi
#done
nmcli connection delete $(nmcli connection show | grep -oP '\s(\S+-\S+-\S+-\S+-\S+)\s') 
if [[ $? -ne 0 ]]; then
    echo 'shit happens while deleting connections' >&1 
    exit 1
fi
echo 'All connections were deleted! now, you will have to type SSID and password again'

echo 

echo 'Disabling Wi-Fi...'
if ! nmcli radio wifi off; then 
    echo 'nmcli, command disabling wifi, is not satisfied for some reason' >&2
    exit 1
fi 
echo 'Wi-Fi is disabled.'

echo 

echo 'Disabling networking...'
if ! nmcli networking off; then 
    echo 'nmcli, command disabling networking, is not happy' >&2 
    exit 1
fi
echo 'Networking is disabled.'

echo

echo 'All is good'
echo '==============================='
exit 0
Here is the corntab line (created using sudo crontab -e) @reboot /home/noor/bin/go-offline-1.0 >> /home/noor/go-offline.log 2>&1 Contents of log file:
Deleting all existing connections...
Error: NetworkManager is not running.
Error: NetworkManager is not running.
shit happens while deleting connections
I guess that at the point of executing my script in the boot process, NetwrokManager is not yet activated. Also after a quick exchange with ChatGPT, I tried to make script run as part of the shut down process rather than at startup using systemlc or sth, but it didn't work for some reason. I don't see reason to mention its details. I had an idea to alias poweroff command so that it executes my script then shut down the computer. I don't know whether it's a good idea but I am looking for a better solution anyway. I welcome all useful responses related to any part of this, including fixes to this method or completely different approach. Thank you!
mark coder (49 rep)
Jul 21, 2025, 11:14 AM • Last activity: Jul 21, 2025, 12:25 PM
0 votes
1 answers
2643 views
Hotspot / Access Point configuration - embedded Linux
I am running an Ubuntu 16.04 derived Linux on an embedded processor, Yocto build Kernel appears to be 4.14.141 I am bringing up a WiFi Access point on the hardware programmatically from C by enabling the radio with a call to system("nmcli r wifi on"); ( This may be superfluous at the moment but bear...
I am running an Ubuntu 16.04 derived Linux on an embedded processor, Yocto build Kernel appears to be 4.14.141 I am bringing up a WiFi Access point on the hardware programmatically from C by enabling the radio with a call to system("nmcli r wifi on"); ( This may be superfluous at the moment but bear with me.) At which point I bring up an access point with system( "nmcli dev wifi hotspot ifname wlan0 ssid \"test\" password \"test1234\" ") So Now I have in /etc/NetworkManager/system-connections a file Hotspot.nmconnection with the correct details for this access point [connection] id=Hotspot-2 uuid=70c76bd2-0e13-492e-8a45-9094bc6e0773 type=wifi autoconnect=false permissions= [wifi] mac-address=00:04:F3:1B:BA:AE mac-address-blacklist= mode=ap ssid=test [wifi-security] group=ccmp; key-mgmt=wpa-psk pairwise=ccmp; proto=rsn; psk=test1234 [ipv4] dns-search= method=shared [ipv6] addr-gen-mode=stable-privacy dns-search= method=ignore My problem is that each time I want to use this access point I want to bring it up with a different SSID and a different password. The Access point is tied to a users session so its life is limited to that session and a set of credentials ( not available except through a passed hardware token ) The Wifi AP starts up to match the presented token and is shut down and can be destroyed after the token is removed. Attempting to modify this configuration file with nmcli system ("nmcli con mod Hotspot ssid \"newTest\" password \"newpass\" "); fails with Error: invalid . 'password'. redefining the AP with the first command results in a successful new wifi AP being created but it gains a new configuration file with a number suffix based on the previous itterations Hotspot-2, Hotspot-n etc, wont be long until my flash overflows. So how do I do this? Where and how do I define a password file which is what I gather I need or how do I change things to allow me to achieve my goal? I have a suspicion that I need to get polkit involved but that's a rabbit warren I have not been down yet.
nimbusgb (101 rep)
Mar 31, 2022, 12:06 PM • Last activity: Jun 25, 2025, 10:04 AM
0 votes
0 answers
164 views
Error: Connection activation failed: IP configuration could not be reserved
I am provisioning RHEL 9 machines via an Ansible playbook that contains this task: - name: Set DNS server community.general.nmcli: conn_name: "{{ conn_name | default('ens192') }}" type: "{{ connection_type | default('ethernet') }}" dns4: - "{{ dns_1_ip }}" - "{{ dns_2_ip }}" state: present Up to RHE...
I am provisioning RHEL 9 machines via an Ansible playbook that contains this task: - name: Set DNS server community.general.nmcli: conn_name: "{{ conn_name | default('ens192') }}" type: "{{ connection_type | default('ethernet') }}" dns4: - "{{ dns_1_ip }}" - "{{ dns_2_ip }}" state: present Up to RHEL 9.3 this playbook worked well. However, on a new RHEL 9.6 server (that I shall call myhost) Ansible returns the error > Error: Connection activation failed: IP configuration could not be reserved (no available address, timeout, etc.) On the server, the command journalctl -xe NM_CONNECTION=c337c0ba-ab72-4510-9015-2c42caccb9b5 + NM_DEVICE=ens192 returns: Jun 17 15:03:33 myhost NetworkManager: [1750165413.4029] device (ens192): disconnecting for new activation request. Jun 17 15:03:33 myhost NetworkManager: [1750165413.4029] device (ens192): state change: activated -> deactivating (reason 'new-activation', managed-type: 'full') Jun 17 15:03:33 myhost NetworkManager: [1750165413.4376] device (ens192): state change: deactivating -> disconnected (reason 'new-activation', managed-type: 'full') Jun 17 15:03:33 myhost NetworkManager: [1750165413.4494] device (ens192): Activation: starting connection 'ens192' (c337c0ba-ab72-4510-9015-2c42caccb9b5) Jun 17 15:03:33 myhost NetworkManager: [1750165413.4510] device (ens192): state change: disconnected -> prepare (reason 'none', managed-type: 'full') Jun 17 15:03:33 myhost NetworkManager: [1750165413.4513] device (ens192): state change: prepare -> config (reason 'none', managed-type: 'full') Jun 17 15:03:33 myhost NetworkManager: [1750165413.4785] device (ens192): state change: config -> ip-config (reason 'none', managed-type: 'full') Jun 17 15:03:33 myhost NetworkManager: [1750165413.4809] dhcp4 (ens192): activation: beginning transaction (timeout in 45 seconds) Jun 17 15:04:19 myhost NetworkManager: [1750165459.1052] device (ens192): state change: ip-config -> failed (reason 'ip-config-unavailable', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1065] device (ens192): Activation: failed for connection 'ens192' Jun 17 15:04:19 myhost NetworkManager: [1750165459.1068] device (ens192): state change: failed -> disconnected (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1159] dhcp4 (ens192): canceled DHCP transaction Jun 17 15:04:19 myhost NetworkManager: [1750165459.1160] dhcp4 (ens192): activation: beginning transaction (timeout in 45 seconds) Jun 17 15:04:19 myhost NetworkManager: [1750165459.1160] dhcp4 (ens192): state changed no lease Jun 17 15:04:19 myhost NetworkManager: [1750165459.1252] device (ens192): Activation: starting connection 'VMware customization ens192' (fdc16ed3-da99-41e1-9938-cdbb2c82f1dd) Jun 17 15:04:19 myhost NetworkManager: [1750165459.1254] device (ens192): state change: disconnected -> prepare (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1269] device (ens192): state change: prepare -> config (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1451] device (ens192): state change: config -> ip-config (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1511] device (ens192): state change: ip-config -> ip-check (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1761] device (ens192): state change: ip-check -> secondaries (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1762] device (ens192): state change: secondaries -> activated (reason 'none', managed-type: 'full') Jun 17 15:04:19 myhost NetworkManager: [1750165459.1766] device (ens192): Activation: successful, device activated. The server's IP address is set statically (no DHCP). The command ip addr returns: 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens192: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:50:56:a3:26:a3 brd ff:ff:ff:ff:ff:ff altname enp11s0 inet 10.140.33.51/24 brd 10.140.33.255 scope global noprefixroute ens192 valid_lft forever preferred_lft forever inet6 fe80::250:56ff:fea3:26a3/64 scope link noprefixroute valid_lft forever preferred_lft forever Output of nmcli connection show: NAME UUID TYPE DEVICE VMware customization ens192 fdc16ed3-da99-41e1-9938-cdbb2c82f1dd ethernet ens192 lo 20226404-dda1-4e98-8bcd-3cc922f7decb loopback lo ens192 c337c0ba-ab72-4510-9015-2c42caccb9b5 ethernet -- What can I further research to troubleshoot why this Ansible playbook fails?
dr_ (32068 rep)
Jun 18, 2025, 03:36 PM • Last activity: Jun 24, 2025, 03:22 PM
1 votes
1 answers
2361 views
Alma Linux - nmcli " No suitable device found"
When I try to bring up a connection called wan0 with nmcli, I'm getting this error. Wan0 is currently unplugged, want to get it configured before plugging it in. I dont know why it's talking about enp2s0, that's not anywhere in the connection config ``` nmcli con up wan0 Error: Connection activation...
When I try to bring up a connection called wan0 with nmcli, I'm getting this error. Wan0 is currently unplugged, want to get it configured before plugging it in. I dont know why it's talking about enp2s0, that's not anywhere in the connection config
nmcli con up wan0
Error: Connection activation failed: No suitable device found for this connection (device enp2s0 not available because profile is not compatible with device (mismatching interface name)).
My connections
nmcli c
NAME  UUID                                  TYPE      DEVICE
lan0  d662827e-fac3-3069-9c71-d8e9ce1cb14a  ethernet  enp3s0f0
lo    71d6ab58-a026-4502-abf4-dcd3dda0de3a  loopback  lo
wan0  c82fe863-6953-49ee-9798-07544d44d530  ethernet  --
My devices
nmcli d
DEVICE    TYPE      STATE                   CONNECTION
enp3s0f0  ethernet  connected               lan0
lo        loopback  connected (externally)  lo
enp2s0    ethernet  unavailable             --
enp3s0f1  ethernet  unavailable             --
I have the right interface name on the connection ``` nmcli c show wan0 connection.id: wan0 connection.uuid: c82fe863-6953-49ee-9798-07544d44d530 connection.stable-id: -- connection.type: 802-3-ethernet connection.interface-name: enp3s0f1
Aditya K (2260 rep)
Jun 26, 2024, 10:02 AM • Last activity: Jun 7, 2025, 03:07 AM
1 votes
2 answers
2612 views
Persist ip route and ip rule configurations for Policy Based Routing (iproute2)
Currently running on Fedora Server 23, I've been searching for the right way to persist commands such as: ip route add default via 10.0.2.1 dev ens32 table EXAMPLE_TABLE ip rule add from 10.1.2.50 lookup EXAMPLE_TABLE prio 1000 either through nmcli (ideally) or through some other, similarly, **sane*...
Currently running on Fedora Server 23, I've been searching for the right way to persist commands such as: ip route add default via 10.0.2.1 dev ens32 table EXAMPLE_TABLE ip rule add from 10.1.2.50 lookup EXAMPLE_TABLE prio 1000 either through nmcli (ideally) or through some other, similarly, **sane** way. I've seen examples like lodging it on the *route-ifname* file but that don't seem to execute the default rule correctly. If you run ip route show table EXAMPLE_TABLE after a reboot you'll realize it doesn't stick - at least in my experience. Any insights into this would be lovely, thank you.
Canha (131 rep)
Dec 7, 2015, 07:05 PM • Last activity: Jun 6, 2025, 04:06 AM
4 votes
2 answers
4421 views
Can't connect to VPN L2TP from Ubuntu 18.04 CLI
I have a VPN that is working when I connect through my windows using L2TP, however when I set up my ubuntu with CLI its not working. I get the following error when I run ``` $ nmcli c up myvpn ``` Error output ``` Error: Connection activation failed: Could not find source connection. ``` ## What I'v...
I have a VPN that is working when I connect through my windows using L2TP, however when I set up my ubuntu with CLI its not working. I get the following error when I run
$ nmcli c up myvpn
Error output
Error: Connection activation failed: Could not find source connection.
## What I've tried - disabled the firewall sudo ufw disable - created the vpn configuration with
nmcli connection add connection.id myvpn con-name myvpn type VPN vpn-type l2tp ifname -- connection.autoconnect no ipv4.method auto vpn.data "gateway = x.x.x.x, ipsec-enabled = yes, ipsec-psk = 0s"$(base64 <<<'psk***psk' | rev | cut -c2- | rev)"=, mru = 1400, mtu = 1400, password-flags = 0, refuse-chap = yes, refuse-mschap = yes, refuse-pap = yes, require-mppe = yes, user = username" vpn.secrets password=mypassword
- NetworkManager is managing the following interfaces
user@ubunut:~# nmcli device status
DEVICE   TYPE      STATE      CONNECTION
eth0     ethernet  connected  eth0
docker0  bridge    connected  docker0
lo       loopback  unmanaged  --
- list all NM connections: nmcli con
NAME             UUID                     TYPE      DEVICE
docker0          ef3eb3a8-c46e-434c-bfcb  bridge    docker0
eth0             fc920355-d18e-495a-b3ca  ethernet  eth0
myvpn	         2b24ce55-98d3-4bc0-8b52  vpn       --
Ifupdown (eth0)  681b428f-beaf-8932-dce4  ethernet  --
Still I'm not able to connect and I'm stuck now. I don't know what else to do to make it work. Does anyone have any idea what the problem might be?
vato (141 rep)
Jan 26, 2021, 12:10 PM • Last activity: May 16, 2025, 11:06 PM
0 votes
1 answers
2702 views
nmcli device status filter specific interface
Is it possible to print the status of DEVICE enp0s9 without using egrep? $ nmcli device status DEVICE TYPE STATE CONNECTION enp0s3 ethernet connected Wired connection 1 enp0s9 ethernet connected Wired connection 2 lo loopback unmanaged -- $ I want similar output by using `nmcli` command only and not...
Is it possible to print the status of DEVICE enp0s9 without using egrep? $ nmcli device status DEVICE TYPE STATE CONNECTION enp0s3 ethernet connected Wired connection 1 enp0s9 ethernet connected Wired connection 2 lo loopback unmanaged -- $ I want similar output by using nmcli command only and not with external command such as egrep $ nmcli device status | egrep 'D|9' DEVICE TYPE STATE CONNECTION enp0s9 ethernet connected Wired connection 2 $
Wolf (1741 rep)
Feb 27, 2021, 08:02 AM • Last activity: May 8, 2025, 01:04 PM
1 votes
1 answers
2792 views
Modifying existing SSID using nmcli
Hi so i know i can set up a wifi network using nmcli in this way. nmcli con add type wifi ifname uap0 mode ap con-name ssid nmcli con modify 802-11-wireless-security.psk But if i now want to modify the password and ssid of the created wifi network how do i do that? i do not find the correct command...
Hi so i know i can set up a wifi network using nmcli in this way. nmcli con add type wifi ifname uap0 mode ap con-name ssid nmcli con modify 802-11-wireless-security.psk But if i now want to modify the password and ssid of the created wifi network how do i do that? i do not find the correct command in the documentation.. Can i just do this sudo nmcli con down sudo nmcli con modify 802-11-wireless-security.psk "$WIFI_PASSWORD" sudo nmcli con modify ssid sudo nmcli con up
busssard (11 rep)
Feb 21, 2023, 04:00 PM • Last activity: May 8, 2025, 03:08 AM
26 votes
3 answers
78997 views
Use nmcli to display the status of a connection
I'm wondering how to display a connection status using [`nmcli`](https://linux.die.net/man/1/nmcli). I understand that the following will display a list of configured connections: nmcli con show And I also understand that the following will show only active connections: nmcli con show --active And t...
I'm wondering how to display a connection status using [nmcli](https://linux.die.net/man/1/nmcli) . I understand that the following will display a list of configured connections: nmcli con show And I also understand that the following will show only active connections: nmcli con show --active And that the following will display *all* settings for a connection (which is a very long list): nmcli con show {connection_name} My question is: Is there a quick way to display the status of a connection? Something similar to: nmcli con status {connection_name} Noting that the above is actually *not* a valid option on CentOS or Fedora.
Khaled Abuelenain (383 rep)
May 5, 2018, 03:13 PM • Last activity: May 4, 2025, 07:04 AM
0 votes
1 answers
62 views
Ethernet connection "unavailable"
I've searched all related questions to this topic, to no avail. I've got an ethernet card on my laptop, but the connection will not work. I checked in the BIOS, and the card is enabled. I can't undestand why mncli list my ethernet connection as "unavailable"... Here are below the results of differen...
I've searched all related questions to this topic, to no avail. I've got an ethernet card on my laptop, but the connection will not work. I checked in the BIOS, and the card is enabled. I can't undestand why mncli list my ethernet connection as "unavailable"... Here are below the results of different command I used to investigate the issue. I used Linux Mint on a Dell Latitude e5520. Any advise highly appreciated. Best regards, MC
mc@mc-Latitude-E5520:~$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
[...]
09:00.2 Mass storage controller: O2 Micro, Inc. O2 Flash Memory Card (rev 05)
0a:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)

mc@mc-Latitude-E5520:~$  sudo lshw -c network -sanitize
  *-network                 
       description: Wireless interface
       product: Centrino Advanced-N 6205 [Taylor Peak]
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 34
       serial: [REMOVED]
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=6.8.0-58-generic firmware=18.168.6.1 6000g2a-6.ucode ip=[REMOVED] latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:27 memory:e5300000-e5301fff
  *-network
       description: Ethernet interface
       product: NetXtreme BCM5761 Gigabit Ethernet PCIe
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:0a:00.0
       logical name: enp10s0
       version: 10
       serial: [REMOVED]
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=6.8.0-58-generic firmware=5761-v3.78 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:30 memory:e4110000-e411ffff memory:e4100000-e410ffff

mc@mc-Latitude-E5520:~$ ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp10s0:  mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether d0:67:e5:34:4a:16 brd ff:ff:ff:ff:ff:ff
3: wlan0:  mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether a0:88:b4:b2:b8:c0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.40/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
       valid_lft 42747sec preferred_lft 42747sec
    inet6 2a01:e0a:b55:b420:2cf2:f8bb:5484:1f9e/64 scope global temporary dynamic 
       valid_lft 86140sec preferred_lft 85723sec
    inet6 2a01:e0a:b55:b420:1f08:4448:2f2f:c436/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 86140sec preferred_lft 86140sec
    inet6 fe80::b80:ca0c:1458:40d/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
mc@mc-Latitude-E5520:~$ ip r
default via 192.168.1.254 dev wlan0 proto dhcp src 192.168.1.40 metric 600 
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.40 metric 600 

mc@mc-Latitude-E5520:~$ sudo  nmcli device
DEVICE   TYPE      STATE                   CONNECTION       
wlan0    wifi      connected               Freebox-5C7A7D 1 
lo       loopback  connected (externally)  lo               
enp10s0  ethernet  unavailable             --               
mc@mc-Latitude-E5520:~$ nmcli con show
NAME                UUID                                  TYPE      DEVICE 
Freebox-5C7A7D 1    7f9fb305-48f8-4547-bf6b-965830a9d664  wifi      wlan0  
lo                  1ad9e920-362a-459e-831d-02e79abba496  loopback  lo     
Freebox-5C7A7D      e78dddb9-7d34-4233-94bb-430b67d424c0  wifi      --     
GLORIOUS EVOLUTION  8cbbc124-2599-4247-b1cc-0fbdd2dd131e  wifi      --     
Maia's Galaxy A12   1ad8128c-afd8-4030-9f60-79a20d719ca6  wifi      --     
Wired connection 1  6bcb00fe-a7d6-3778-bcbf-85def4429cb4  ethernet  --     
mc@mc-Latitude-E5520:~$ sudo nmcli -f all connection 
NAME                UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                    AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE  STATE      ACTIVE>
Freebox-5C7A7D 1    7f9fb305-48f8-4547-bf6b-965830a9d664  wifi      1746012961  Wed 30 Apr 2025 01:36:01 PM CEST  yes          0                     no        /org/freedesktop/NetworkManager/Settings/4  yes     wlan0   activated  /org/f>
lo                  1ad9e920-362a-459e-831d-02e79abba496  loopback  1746012957  Wed 30 Apr 2025 01:35:57 PM CEST  no           0                     no        /org/freedesktop/NetworkManager/Settings/1  yes     lo      activated  /org/f>
Freebox-5C7A7D      e78dddb9-7d34-4233-94bb-430b67d424c0  wifi      1746010526  Wed 30 Apr 2025 12:55:26 PM CEST  yes          0                     no        /org/freedesktop/NetworkManager/Settings/6  no      --      --         --    >
GLORIOUS EVOLUTION  8cbbc124-2599-4247-b1cc-0fbdd2dd131e  wifi      1735586099  Mon 30 Dec 2024 08:14:59 PM CET   yes          0                     no        /org/freedesktop/NetworkManager/Settings/5  no      --      --         --    >
Maia's Galaxy A12   1ad8128c-afd8-4030-9f60-79a20d719ca6  wifi      1735661656  Tue 31 Dec 2024 05:14:16 PM CET   yes          0                     no        /org/freedesktop/NetworkManager/Settings/2  no      --      --         --    >
Wired connection 1  6bcb00fe-a7d6-3778-bcbf-85def4429cb4  ethernet  0           never                             yes          1                     no        /org/freedesktop/NetworkManager/Settings/3  no      --      --         --    >
mc62 (121 rep)
Apr 30, 2025, 12:21 PM • Last activity: Apr 30, 2025, 03:51 PM
0 votes
1 answers
132 views
How to make ip link settings persistent on ubuntu 22.04
I'm trying to make persistent some ip links settings on ubuntu 22.04 desktop. Commands below works fine but are not persistent: ``` ip link add mynet-shim link eno1 type macvlan mode bridge ip addr add 192.168.1.223/32 dev mynet-shim ip link set mynet-shim up ip route add 192.168.1.192/27 dev mynet-...
I'm trying to make persistent some ip links settings on ubuntu 22.04 desktop. Commands below works fine but are not persistent:
ip link add mynet-shim link eno1 type macvlan  mode bridge
ip addr add 192.168.1.223/32 dev mynet-shim
ip link set mynet-shim up
ip route add 192.168.1.192/27 dev mynet-shim
I have tried using nmcli but it seems macvlan bridge is not available. Do you have any idea or a tutorial explaining how to proceed?
Sam99 (3 rep)
Apr 27, 2025, 09:30 PM • Last activity: Apr 28, 2025, 10:53 AM
20 votes
5 answers
66515 views
Remove secondary IP with NetworkManager / nmcli
I tried to assign a static IP to my Ubuntu 16.04 server using nmcli, which worked but it still has the original IP reserved as a "secondary" IP. I'm not sure how to get rid of it. 10.163.148.36 is the original IP of the server and 10.163.148.194 is the new IP I want it to switch to. I used the follo...
I tried to assign a static IP to my Ubuntu 16.04 server using nmcli, which worked but it still has the original IP reserved as a "secondary" IP. I'm not sure how to get rid of it. 10.163.148.36 is the original IP of the server and 10.163.148.194 is the new IP I want it to switch to. I used the following nmcli command to set the IP address: nmcli connection modify 'Wired connection 1' ipv4.addresses '10.163.148.194/24' ipv4.gateway '10.163.148.2' ipv4.method 'manual' ipv4.ignore-auto-dns 'yes' connection.autoconnect 'yes' ipv4.dns '10.10.10.10 10.20.10.10' Note the two IP addresses for the ens160 interface. aruba@ubuntu:~$ ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens160: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:50:56:8a:10:64 brd ff:ff:ff:ff:ff:ff inet 10.163.148.194/24 brd 10.163.148.255 scope global ens160 valid_lft forever preferred_lft forever inet 10.163.148.36/24 brd 10.163.148.255 scope global secondary ens160 valid_lft forever preferred_lft forever inet6 2006::b0a3:b9ab:2f96:a461/64 scope global temporary dynamic valid_lft 604254sec preferred_lft 85254sec inet6 2006::dc94:ead6:e8ef:8095/64 scope global mngtmpaddr noprefixroute dynamic valid_lft 2591987sec preferred_lft 604787sec inet6 fe80::941e:5fa3:3571:df76/64 scope link valid_lft forever preferred_lft forever My nmcli connection details: aruba@ubuntu:~$ nmcli connection show "Wired connection 1" connection.id: Wired connection 1 connection.uuid: d724141e-4c7f-3fc9-97b1-c37e014aebe4 connection.interface-name: -- connection.type: 802-3-ethernet connection.autoconnect: yes connection.autoconnect-priority: -999 connection.timestamp: 1481582261 connection.read-only: no connection.permissions: connection.zone: -- connection.master: -- connection.slave-type: -- connection.autoconnect-slaves: -1 (default) connection.secondaries: connection.gateway-ping-timeout: 0 connection.metered: unknown connection.lldp: -1 (default) 802-3-ethernet.port: -- 802-3-ethernet.speed: 0 802-3-ethernet.duplex: -- 802-3-ethernet.auto-negotiate: yes 802-3-ethernet.mac-address: 00:50:56:8A:10:64 802-3-ethernet.cloned-mac-address: -- 802-3-ethernet.mac-address-blacklist: 802-3-ethernet.mtu: auto 802-3-ethernet.s390-subchannels: 802-3-ethernet.s390-nettype: -- 802-3-ethernet.s390-options: 802-3-ethernet.wake-on-lan: 1 (default) 802-3-ethernet.wake-on-lan-password: -- ipv4.method: manual ipv4.dns: 10.1.10.10,10.2.10.10 ipv4.dns-search: ipv4.dns-options: (default) ipv4.addresses: 10.163.148.194/24 ipv4.gateway: 10.163.148.1 ipv4.routes: ipv4.route-metric: -1 ipv4.ignore-auto-routes: no ipv4.ignore-auto-dns: no ipv4.dhcp-client-id: -- ipv4.dhcp-timeout: 0 ipv4.dhcp-send-hostname: yes ipv4.dhcp-hostname: -- ipv4.dhcp-fqdn: -- ipv4.never-default: no ipv4.may-fail: yes ipv4.dad-timeout: -1 (default) ipv6.method: auto ipv6.dns: ipv6.dns-search: ipv6.dns-options: (default) ipv6.addresses: ipv6.gateway: -- ipv6.routes: ipv6.route-metric: -1 ipv6.ignore-auto-routes: no ipv6.ignore-auto-dns: no ipv6.never-default: no ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: stable-privacy ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- GENERAL.NAME: Wired connection 1 GENERAL.UUID: d724141e-4c7f-3fc9-97b1-c37e014aebe4 GENERAL.DEVICES: ens160 GENERAL.STATE: activated GENERAL.DEFAULT: yes GENERAL.DEFAULT6: yes GENERAL.VPN: no GENERAL.ZONE: -- GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/0 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/0 GENERAL.SPEC-OBJECT: / GENERAL.MASTER-PATH: -- IP4.ADDRESS: 10.163.148.194/24 IP4.ADDRESS: 10.163.148.36/24 IP4.GATEWAY: 10.163.148.2 IP4.DNS: 10.10.10.10 IP4.DNS: 10.20.10.10 IP6.ADDRESS: 2006::b0a3:b9ab:2f96:a461/64 IP6.ADDRESS: 2006::dc94:ead6:e8ef:8095/64 IP6.ADDRESS: fe80::941e:5fa3:3571:df76/64 IP6.GATEWAY: fe80::213:1aff:fec7:f857 Lastly, my NetworkManager config: aruba@ubuntu:~$ cat /etc/NetworkManager/NetworkManager.conf [main] plugins=keyfile,ofono dns=dnsmasq [ifupdown] managed=true
ravishi (355 rep)
Dec 13, 2016, 12:25 AM • Last activity: Apr 23, 2025, 03:24 PM
2 votes
1 answers
2322 views
Connecting to open networks using nmcli Wi-Fi network could not be found
I have an an orange pi zero running armbian I am having problem connecting to open networks using nmcli. I can very well connect to my home "WPA1 WPA2" secured network with no issue at all. Here is to list the network: # nmcli device wifi list IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY XX...
I have an an orange pi zero running armbian I am having problem connecting to open networks using nmcli. I can very well connect to my home "WPA1 WPA2" secured network with no issue at all. Here is to list the network: # nmcli device wifi list IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY XX:XX:XX:XX:XX:XX MyNetwork Infra 7 405 Mbit/s 100 ▂▄▆█ WPA1 WPA2 I use the following command to connect to it and it works perfect: # nmcli device wifi con MyNetwork password 'mypassword' Connection 'MyNetwork' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/48) Now if I turn my android phone to a hotspot with no password, the nmcli can not connect to it. Here is how the nmcli sees the open hotspot (as you can see there are no security set): # nmcli device wifi list IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY XX:XX:XX:XX:XX:XX MyNetwork Infra 7 405 Mbit/s 97 ▂▄▆█ WPA1 WPA2 XX:XX:XX:XX:XX:XX OpenNetwork Infra 1 130 Mbit/s 94 ▂▄▆█ -- My assumption is that I should just use the same command I used to connect to my secure WiFi, but omit the password part...but for some reason I get the following error: # nmcli device wifi con OpenNetwork Error: Connection activation failed: (53) The Wi-Fi network could not be found. I tried this with some other open networks, I get the same error. Is there something that I am missing? is the a driver issue? or is there some settings that I need to change/enable for nmcli to support open networks?
DEKKER (998 rep)
Jul 19, 2021, 05:08 PM • Last activity: Apr 7, 2025, 12:04 PM
0 votes
1 answers
1911 views
nmcli not showing connections
I am new to Linux and was trying to configure my system.&#160; I&#160;wanted to use https://github.com/ericmurphyxyz/rofi-wifi-menu, but saw it was not showing any connections.\ When I enter `nmcli` I get this: ``` lo: connected (externally) to lo "lo" loopback (unknown), 00:00:00:00:00:00, sw, mtu...
I am new to Linux and was trying to configure my system.  I wanted to use https://github.com/ericmurphyxyz/rofi-wifi-menu , but saw it was not showing any connections.\ When I enter nmcli I get this:
lo: connected (externally) to lo
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
        inet4 127.0.0.1/8
        inet6 ::1/128

enp2s0: unavailable
        "Realtek RTL8111/8168/8411"
        ethernet (r8169), B4:45:06:D9:65:B5, hw, mtu 1500

wlp3s0: unavailable
        "Realtek RTL8821CE"
        wifi (rtw_8821ce), 9A:98:C1:92:6D:79, hw, mtu 1500
And entering nmcli device wifi list I get:
IN-USE  BSSID  SSID  MODE  CHAN  RATE  SIGNAL  BARS  SECURITY
Entering nmcli con:
NAME                UUID                                  TYPE      DEVICE 
lo                  66a00c43-8262-495a-a808-19daa15176e2  loopback  lo     
Wired connection 1  ca90b794-139c-36fd-a248-3ca5b1b4602b  ethernet  --
Entering nmcli con show wlp3s0:
Error: wlp3s0 - no such connection profile.
A thing to note is my laptop is connected to the Wi-Fi and can access the internet, and I connected to the Wi-Fi during the installation of Debian.  And when I restart NetworkManager, it doesn't reconnect to the Wi-Fi unless I reboot. I'll gladly provide any more info for help. **Edit**: I have not made any changes to the network settings since installation. Also now on some boots I don't have Wi-Fi, only after a few reboots do I connect. Adding a connection with nmcli con add, I now get the output from nmcli con show:
NAME                UUID                                  TYPE      DEVICE 
lo                  051be556-c06e-4a8f-ad7c-9fb29f276ba9  loopback  lo     
wifi                16ab3681-5062-4d1c-be34-be6f41cefd29  wifi      --     
Wired connection 1  ca90b794-139c-36fd-a248-3ca5b1b4602b  ethernet  --
user438409385 (1 rep)
May 17, 2024, 01:57 PM • Last activity: Mar 14, 2025, 07:02 PM
0 votes
0 answers
66 views
Show encryption used by WiFi stations connected to my hotspot
I'm hosting a hotspot from my PC, which has a wired internet connection and a wifi adapter. The OS is Fedora 40, using Network Manager and wpa_supplicant. I have 3 wifi devices which are able to connect to this hotspot and use the internet. I want to know what "mode" each device chose to connect usi...
I'm hosting a hotspot from my PC, which has a wired internet connection and a wifi adapter. The OS is Fedora 40, using Network Manager and wpa_supplicant. I have 3 wifi devices which are able to connect to this hotspot and use the internet. I want to know what "mode" each device chose to connect using (by which I mean cipher suites/encryption techniques = WPA/WPA2 & TKIP/AES/CCMP). How do I query this information? My router seems to know this information just fine and shows it up in its web pages, now I want to be able to pull up the same info on my Linux PC. hostapd does not seem to be installed, so I'm wary of installing it to use hostapd_cli because it might disrupt whatever is currently running. wpa_cli refuses to run because it can't connect to the running instance [wpa_cli is now running after enabling its control socket](https://www.jfcarter.net/~jimc/documents/bugfix/34-wpa_cli.html) , but I can't tell how to ask it for this information. Background: I'm trying to debug some wifi connection issues with an IoT device, which is happily connecting to a hotspot hosted by my PC but not to my network hosted from the router device. I suspect an encryption issue.
Milind R (111 rep)
Feb 25, 2025, 02:48 PM • Last activity: Mar 12, 2025, 05:32 PM
7 votes
2 answers
30824 views
How to connect to WiFi with nmcli
I am a new Linux user (windows before), and I downloaded Arch Linux last night. The installation was fairly straightforward, but after I rebooted I no longer had connection to WiFi. Thankfully I had downloaded `networkmanager`, however I still can't seem to connect to the internet. For one when I us...
I am a new Linux user (windows before), and I downloaded Arch Linux last night. The installation was fairly straightforward, but after I rebooted I no longer had connection to WiFi. Thankfully I had downloaded networkmanager, however I still can't seem to connect to the internet. For one when I use the command
nmcli dev wifi list
nothing happens. I added a connection directly to my IP address which worked, however it didn't become an active connection. I know if I reinstall arch I can get a different network manager, but I would rather not. How can I connect to my network?
Jaden (71 rep)
Oct 28, 2021, 06:26 AM • Last activity: Feb 27, 2025, 03:49 AM
0 votes
0 answers
22 views
Kali rtl18723be unable to view list available ssid
I have installed Kali like usual OS, in the process of installation didn't get any problems, I've connected to my wifi. But after install Kali, I can't to view list of the SSIDs by command `nmcli device wifi list` , I tried to change antenna, by command ` sudo modprobe -r rtl8723be sudo modprobe rtl...
I have installed Kali like usual OS, in the process of installation didn't get any problems, I've connected to my wifi. But after install Kali, I can't to view list of the SSIDs by command nmcli device wifi list , I tried to change antenna, by command ` sudo modprobe -r rtl8723be sudo modprobe rtl8723be ant_sel=1` sometimes ant_sel=1 works fine or ant_sel=2 untill reboot the system. Can any one, how to fix it?
mrz (1 rep)
Feb 12, 2025, 09:45 AM • Last activity: Feb 12, 2025, 09:57 AM
0 votes
1 answers
159 views
nmcli g gives the wrong status because there is no wifi hardware on the machine
My machine is a VM with no wifi hardware. It is connected with eth0 and everything works as it should, except for `nmcli g status`, which shows the "CONNECTIVITY" as "unknown" and "WIFI-HW" as "missing". How do I get it to understand that there is no WIFI hardware and that it is totally acceptable a...
My machine is a VM with no wifi hardware. It is connected with eth0 and everything works as it should, except for nmcli g status, which shows the "CONNECTIVITY" as "unknown" and "WIFI-HW" as "missing". How do I get it to understand that there is no WIFI hardware and that it is totally acceptable and that it should show that I am fully connected? All my searches turns up suggestions on how to debug the WIFI. I do not have it installed and want it to recognize that, as far as network connections is concerned, the world is honky dory. This is Debian GNU/Linux 12 (bookworm).
Simon Prinsloo (3 rep)
Jan 25, 2025, 01:45 PM • Last activity: Jan 26, 2025, 12:36 AM
2 votes
1 answers
3390 views
"Secrets were required, but not provided" when connecting to Wi-Fi from Raspberry PI 4
I installed `nmcli` in my Raspberry PI 4. I connected to my local WiFi and after a while I got an image from my SD card. Right now I use that image file in another SD card with another Raspberry PI 4, but when I tried to connect to my local wifi I got this error: ```none Connection activation failed...
I installed nmcli in my Raspberry PI 4. I connected to my local WiFi and after a while I got an image from my SD card. Right now I use that image file in another SD card with another Raspberry PI 4, but when I tried to connect to my local wifi I got this error:
Connection activation failed: (7) Secrets were required, but not provided.
When I tried to connect to my phone hotspot it worked very well. Again when I tried to connect to my local network it wouldn't work. I tried to delete my last connection and connect again but it doesn't work. **Update:** I discovered that the internal Wi-Fi on the Raspberry Pi does not function well when the power supply is insufficient, such as when using a phone charger. This issue is attributed to the power management of the Raspberry Pi 4, resulting in errors. However, you have the option to use an external Wi-Fi dongle instead of relying on the internal Wi-Fi. This external dongle performs better in terms of sending and receiving signals and provides improved coverage.
danial hadi (21 rep)
Nov 17, 2021, 04:52 PM • Last activity: Jan 14, 2025, 09:04 AM
8 votes
2 answers
4740 views
How to set wireless key with nmcli interactively and securely without entering it in the command
I can set my wifi key of the connection `my_connection` to `my_password` by running nmcli con modify my_connection wifi-sec.psk my_password How can I have a secured interactive password reading from `nmcli`, i.e with prompt and not showing the entered letters as for `passwd` command?
I can set my wifi key of the connection my_connection to my_password by running nmcli con modify my_connection wifi-sec.psk my_password How can I have a secured interactive password reading from nmcli, i.e with prompt and not showing the entered letters as for passwd command?
user123456 (5258 rep)
Oct 14, 2016, 06:33 PM • Last activity: Jan 11, 2025, 02:12 AM
Showing page 1 of 20 total questions