Saturday, April 2, 2022

Ubuntu/Linux: Retrieving a Computer's IP Address using ifconfig

Consider the case where a developer wants to ssh from a host computer to a Ubuntu client running in Hyper-V. The most fundamental way to access the client machine via ssh is using its IP address. Linux's ifconfig utility is short for interface config.

The ifconfig utility is part of the net-tools package. To install this package on Ubutu use apt-get as follows:

sudo apt-get update -y
sudo apt-get install -y net-tools

An example of ifconfig being invoked is as follows where the computer's IP is shown to be 10.0.37:





No comments :

Post a Comment