June 2019
Intermediate to advanced
328 pages
7h 27m
English
Every computer connected to the Internet or a TCP/IP network has an IP address, and there are several methods you can use to determine yours from the command line.
The ifconfig command is a legacy command that displays information about your network devices. While there are newer tools available, you’re going to start by exploring this tool because it’s universally available on Mac and Linux. On Ubuntu 18.04, you’ll need to install the net-tools package to use it:
| | $ sudo apt install net-tools |
Once it’s installed, run ifconfig:
| | $ ifconfig |
You’ll see a bunch of output appear on the screen, starting with something that looks like this:
| | enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> ... |