From the course: Linux System Engineer: Networking and SSH
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Get IP address, subnet mask, and default gateway
From the course: Linux System Engineer: Networking and SSH
Get IP address, subnet mask, and default gateway
- [Instructor] Traditionally, Linux used the net tools commands including ifconfig, netstat, and route. These commands have mostly been superseded by the iproute2 suite of tools, including the IP command. I find the syntax of the Legacy Tools easy to remember, but in time they may no longer be available, so it's important to migrate to iproute. We will install the net tools package in this course so we have access to the Legacy commands, as well as the replacements which are installed by default. To do so in a terminal type sudo yum -y install net-tools, and hit Enter. Then type in your password. If the net tools packet is already installed, it'll let you know. We'll reference both the Legacy commands and the replacements, so users with prior experience can migrate to the new commands easier. To get IP address and network mask information using the Legacy tools, we'll type in clear, and then type in ifconfig. From this output, we can see the IP version four and IP version six…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.