O'Reilly logo

CompTIA Linux+ Certification Guide by Philip Inshanally

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required