How can I see using command-line whether I am connected to network using eth0, eth1 or wln0 etc?
Well, to elaborate, I have a desktop sidebar which I installed using program "conky". This sidebar has meter that shows internet speed. Since I am not using eth0, I need to make a minor change in ~/.conkyrc file. I need to replace "eth0" with whatever network is being used by my wireless card to connect to internet (via a router).
You may very well be connected to multiple networks at once, depending on your setup.
If you are interested in knowing which interface is being used for Internet traffic, try using the
ip route
command and look at the default route. For example, on my system it shows that traffic will travel overeth0
if it isn't matched by any of the other rules in the table: