Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 20280  / 3 Years ago, fri, july 9, 2021, 1:14:51

I want to obtain the currently connected wifi networks ssid in a bash script. I am trying to write a backup script where the script will perform a backup to a NAS server if it's connected to my home wifi network. I have looked into the ip route command but it only returns some basic information -
enter image description here


More From » wireless

 Answers
6

The following should provide what you are looking for assuming you are connected using 1 wireless device:



nmcli -t -f ssid dev wifi| cut -d' -f2

[#31714] Saturday, July 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
weamp

Total Points: 197
Total Questions: 115
Total Answers: 92

Location: Mauritania
Member since Sun, May 7, 2023
1 Year ago
;