Mailinglist Archive: opensuse (1108 mails)

< Previous Next >
Re: [opensuse] What would be the proper command to swtich off wlan?
On 2018-08-24 11:17, Bengt Gördén wrote:
On 2018-08-24 10:30, Carlos E. R. wrote:
Hi,

Hi Carlos,



I have a small laptop that doesn't have a separate switch for the WiFi,
and when I plug in the ethernet cable I get both wlan and eth
connections, which cause some problems (it should not, but it does).

The laptop has a "airplane button" on F7 special keys which is ignored.
Other keys do work, like the volume.

The command "rcnetwork stop wlan1" does stop wlan, but "rcnetwork
restart eth0" starts again the wifi (both, eth and wlan).

How can I stop the wlan, so that NM doesn't reactivate it again?


I had similar problem a few years back at a conference. I'm not sure
(can't remember exactly what I did) but I think I did like the manual
said for nmcli. It stops wlan1 from auto-connecting.

nmcli dev disconnect wlan1

Ref.
man nmcli
search for "nmcli dev disconnect em2"

And to connect again?

I fail to see "nmcli dev connect"?


maybe this one:

nmcli radio {all | wifi | wwan} [ARGUMENTS...]

But:

Legolas:~ # nmcli radio wifi
Error: NetworkManager is not running.
Legolas:~ #

which is absurd.

Ah.

Legolas:~ # rcnetwork restart
Legolas:~ # nmcli radio wifi
enabled
Legolas:~ #

Legolas:~ # nmcli radio wifi off
Legolas:~ # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.127 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::f8a0:12a3:7a65:18ab prefixlen 64 scopeid 0x20<link>
ether 1c:83:41:1b:d8:33 txqueuelen 1000 (Ethernet)
RX packets 173191214 bytes 261212028115 (243.2 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13363574 bytes 1741202542 (1.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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 1000 (Local Loopback)
RX packets 78023 bytes 528126292 (503.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 78023 bytes 528126292 (503.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Legolas:~ # nmcli radio wifi on
Legolas:~ # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.127 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::f8a0:12a3:7a65:18ab prefixlen 64 scopeid 0x20<link>
ether 1c:83:41:1b:d8:33 txqueuelen 1000 (Ethernet)
RX packets 173191243 bytes 261212030349 (243.2 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13363589 bytes 1741205252 (1.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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 1000 (Local Loopback)
RX packets 78023 bytes 528126292 (503.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 78023 bytes 528126292 (503.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether ee:44:75:b6:4a:0a txqueuelen 1000 (Ethernet)
RX packets 155634 bytes 10336397 (9.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4135 bytes 431016 (420.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Legolas:~ #

This is good :-)


Thanks for the hint! :-)



--
Cheers / Saludos,

Carlos E. R.
(from 42.3 x86_64 "Malachite" at Telcontar)

< Previous Next >
Follow Ups