DEV Community

Mao Le
Mao Le

Posted on

Tips CMD

Working tips

It just note everything when I researching my working issue.

How to know which network you are using when you turn on both ethernet and wifi connections

After researching some guide on the internet. I summarize it to a one line terminal for checking.

The first thing, I will check the IP address from ethernet connection at network setting

check ip address

After that I use terminal and type the following command:

route -n get 0.0.0.0 | grep interface |  awk '{print $2}' | xargs ipconfig getifaddr
Enter fullscreen mode Exit fullscreen mode

The result will show the ip was active.

Top comments (0)