The ifconfig command

The ifconfig command can be used to manage IPv4 addressing information at the command line. We can run the ifconfig command without any options and it will display only active interfaces, as seen in the following command:

root@philip-virtual-machine:/home/philip# ifconfigCommand 'ifconfig' not found, but can be installed with:apt install net-toolsroot@philip-virtual-machine:/home/philip#

Based on what we have found in the preceding command, we see that the ifconfig utility is not installed in Ubuntu 18 by default; this can easily be remedied by running either the apt or apt-get command, as shown in the following example:

root@philip-virtual-machine:/home/philip# apt install net-toolsReading package lists... DoneBuilding ...

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.