Hacker News new | ask | show | jobs
by mapgrep 3835 days ago
Cool but some questions on the command line args:

Call be dumb but I have no idea what my wireless NIC is called and that's the first arg to the script.

How do I find out the handle for my wireless network card (I didn't even know it had a name), but also does anyone know why the script can't self detect that? Don't most people only have one?

Ditto for the SSID, couldn't the script just figure out what SSID I'm connected to?

Asking as much for self education as anything else...

2 comments

You can see your wireless card's name in the network management widget details' dialog/pane, or simply run 'iwconfig' in a terminal.

The script could automate the discovery of both information but that would make it larger and much more error prone.

Your comment is nice, it shows how Linux Desktop nowadays is so easy to use, one does not have to worry about technical details.

On Linux, run ifconfig as root. The problem is that there's no naming convention for NIC names. Some systems use ethX for both wired and wireless systems, some ethX/wlanX, and some use wlx-(macaddress) unique name.
Why would you need to to root to see the list of network cards? ifconfig as non-root, or just ip addr, works fine.

Note that newer debian versions seem to have moved ifconfig to sbin so it's not in a normal user's $PATH

Just heads up ifconfig is considered deprecated and ip addr show is the correct command on many modern distros.