Get connected Wi-Fi network signal strength with nmcli
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I'm able to get the signal strength of all Wi-Fi networks with the following command:
$ nmcli -t -f SIGNAL device wifi list
$ 77
67
60
59
55
45
44
39
39
37
I would like to reduce this list only to the current Wi-Fi on which I'm connected. I've been through the man page but can't find the necessary flag.
One solution would be to use sed
or awk
, but I would like to avoid piping.
Should I use nmcli device wifi
instead of parsing directly for the SIGNAL column?
linux nmcli
New contributor
add a comment |
up vote
3
down vote
favorite
I'm able to get the signal strength of all Wi-Fi networks with the following command:
$ nmcli -t -f SIGNAL device wifi list
$ 77
67
60
59
55
45
44
39
39
37
I would like to reduce this list only to the current Wi-Fi on which I'm connected. I've been through the man page but can't find the necessary flag.
One solution would be to use sed
or awk
, but I would like to avoid piping.
Should I use nmcli device wifi
instead of parsing directly for the SIGNAL column?
linux nmcli
New contributor
1
Useiwconfig
instead.
– Ipor Sircer
Nov 22 at 9:52
Or use the neveriw scan
etc. instead of the olderiwconfig
.
– dirkt
Nov 22 at 10:15
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I'm able to get the signal strength of all Wi-Fi networks with the following command:
$ nmcli -t -f SIGNAL device wifi list
$ 77
67
60
59
55
45
44
39
39
37
I would like to reduce this list only to the current Wi-Fi on which I'm connected. I've been through the man page but can't find the necessary flag.
One solution would be to use sed
or awk
, but I would like to avoid piping.
Should I use nmcli device wifi
instead of parsing directly for the SIGNAL column?
linux nmcli
New contributor
I'm able to get the signal strength of all Wi-Fi networks with the following command:
$ nmcli -t -f SIGNAL device wifi list
$ 77
67
60
59
55
45
44
39
39
37
I would like to reduce this list only to the current Wi-Fi on which I'm connected. I've been through the man page but can't find the necessary flag.
One solution would be to use sed
or awk
, but I would like to avoid piping.
Should I use nmcli device wifi
instead of parsing directly for the SIGNAL column?
linux nmcli
linux nmcli
New contributor
New contributor
New contributor
asked Nov 22 at 9:36
Grégoire Borel
1183
1183
New contributor
New contributor
1
Useiwconfig
instead.
– Ipor Sircer
Nov 22 at 9:52
Or use the neveriw scan
etc. instead of the olderiwconfig
.
– dirkt
Nov 22 at 10:15
add a comment |
1
Useiwconfig
instead.
– Ipor Sircer
Nov 22 at 9:52
Or use the neveriw scan
etc. instead of the olderiwconfig
.
– dirkt
Nov 22 at 10:15
1
1
Use
iwconfig
instead.– Ipor Sircer
Nov 22 at 9:52
Use
iwconfig
instead.– Ipor Sircer
Nov 22 at 9:52
Or use the never
iw scan
etc. instead of the older iwconfig
.– dirkt
Nov 22 at 10:15
Or use the never
iw scan
etc. instead of the older iwconfig
.– dirkt
Nov 22 at 10:15
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
To get the SIGNAL of the AP on which you are connected use:
nmcli dev wifi list | awk '/*/if (NR!=1) print $7'
The second *
mark in nmcli dev wifi list
is set to identify the SSID on which your are connected.
nmcli --version
nmcli tool, version 1.6.2
1
It works for me if I useprint $6
instead ofprint $7
.
– Grégoire Borel
Nov 22 at 10:28
2
@GrégoireBorel Great! it depend onnmcli
version.
– GAD3R
Nov 22 at 10:30
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
add a comment |
up vote
0
down vote
If you know the name of the network you're connected to, you could modify your approach like this:
nmcli -t -f SSID,SIGNAL | grep "^<network name>:" | cut -d : -f 2
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
To get the SIGNAL of the AP on which you are connected use:
nmcli dev wifi list | awk '/*/if (NR!=1) print $7'
The second *
mark in nmcli dev wifi list
is set to identify the SSID on which your are connected.
nmcli --version
nmcli tool, version 1.6.2
1
It works for me if I useprint $6
instead ofprint $7
.
– Grégoire Borel
Nov 22 at 10:28
2
@GrégoireBorel Great! it depend onnmcli
version.
– GAD3R
Nov 22 at 10:30
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
add a comment |
up vote
3
down vote
accepted
To get the SIGNAL of the AP on which you are connected use:
nmcli dev wifi list | awk '/*/if (NR!=1) print $7'
The second *
mark in nmcli dev wifi list
is set to identify the SSID on which your are connected.
nmcli --version
nmcli tool, version 1.6.2
1
It works for me if I useprint $6
instead ofprint $7
.
– Grégoire Borel
Nov 22 at 10:28
2
@GrégoireBorel Great! it depend onnmcli
version.
– GAD3R
Nov 22 at 10:30
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
To get the SIGNAL of the AP on which you are connected use:
nmcli dev wifi list | awk '/*/if (NR!=1) print $7'
The second *
mark in nmcli dev wifi list
is set to identify the SSID on which your are connected.
nmcli --version
nmcli tool, version 1.6.2
To get the SIGNAL of the AP on which you are connected use:
nmcli dev wifi list | awk '/*/if (NR!=1) print $7'
The second *
mark in nmcli dev wifi list
is set to identify the SSID on which your are connected.
nmcli --version
nmcli tool, version 1.6.2
edited Nov 22 at 10:28
answered Nov 22 at 10:25
GAD3R
24.6k1749103
24.6k1749103
1
It works for me if I useprint $6
instead ofprint $7
.
– Grégoire Borel
Nov 22 at 10:28
2
@GrégoireBorel Great! it depend onnmcli
version.
– GAD3R
Nov 22 at 10:30
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
add a comment |
1
It works for me if I useprint $6
instead ofprint $7
.
– Grégoire Borel
Nov 22 at 10:28
2
@GrégoireBorel Great! it depend onnmcli
version.
– GAD3R
Nov 22 at 10:30
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
1
1
It works for me if I use
print $6
instead of print $7
.– Grégoire Borel
Nov 22 at 10:28
It works for me if I use
print $6
instead of print $7
.– Grégoire Borel
Nov 22 at 10:28
2
2
@GrégoireBorel Great! it depend on
nmcli
version.– GAD3R
Nov 22 at 10:30
@GrégoireBorel Great! it depend on
nmcli
version.– GAD3R
Nov 22 at 10:30
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
Debugging failing scripts if it depends on the nmcli version will be fun...
– dirkt
Nov 22 at 11:27
add a comment |
up vote
0
down vote
If you know the name of the network you're connected to, you could modify your approach like this:
nmcli -t -f SSID,SIGNAL | grep "^<network name>:" | cut -d : -f 2
add a comment |
up vote
0
down vote
If you know the name of the network you're connected to, you could modify your approach like this:
nmcli -t -f SSID,SIGNAL | grep "^<network name>:" | cut -d : -f 2
add a comment |
up vote
0
down vote
up vote
0
down vote
If you know the name of the network you're connected to, you could modify your approach like this:
nmcli -t -f SSID,SIGNAL | grep "^<network name>:" | cut -d : -f 2
If you know the name of the network you're connected to, you could modify your approach like this:
nmcli -t -f SSID,SIGNAL | grep "^<network name>:" | cut -d : -f 2
answered Nov 22 at 10:06
telcoM
14.5k11842
14.5k11842
add a comment |
add a comment |
Grégoire Borel is a new contributor. Be nice, and check out our Code of Conduct.
Grégoire Borel is a new contributor. Be nice, and check out our Code of Conduct.
Grégoire Borel is a new contributor. Be nice, and check out our Code of Conduct.
Grégoire Borel is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483396%2fget-connected-wi-fi-network-signal-strength-with-nmcli%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Use
iwconfig
instead.– Ipor Sircer
Nov 22 at 9:52
Or use the never
iw scan
etc. instead of the olderiwconfig
.– dirkt
Nov 22 at 10:15