10 lines
327 B
Bash
Executable File
10 lines
327 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Get all network interfaces listed by nmcli
|
|
interfaces=$(nmcli -t -f DEVICE device | grep -v '^lo$' | grep -v '^$')
|
|
|
|
# Loop through each interface and set it as managed
|
|
for iface in $interfaces; do
|
|
echo "Setting $iface to be managed by NetworkManager..."
|
|
nmcli device set "$iface" managed yes
|
|
done |