TIL: About Linux IP Command

- 1 min

ip on Linux

TIL about the Linux ip command and how to use it to configure network interfaces.


For context, we have a service that communicates with an external service over HTTP. After restarting the service, we noticed that the server failed to communicate with the external service, returning Connection refused. The external service was functioning correctly and other services had no issues connecting.

$ curl external-service.com:5984
curl: (7) Failed connect to external-service.com:5984; Connection refused

To find the current machine’s IP, we could use the ip tool.


In our case, we used ip a (or ip addr) to display all network devices.


In the image above, various network interfaces are displayed as well as their associated addresses.

Randy Kinne

Randy Kinne

Software Engineer

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora