010-150 · Question #21
Which of the following commands is used to look up the current IP address of a system?
The correct answer is B. ifconfig. ifconfig is the classic Unix/Linux utility for displaying and configuring network interface parameters including IP addresses. The Windows equivalent ipconfig is not used on Linux systems.
Question
Which of the following commands is used to look up the current IP address of a system?
Options
- Aless /proc/net/ipconfig
- Bifconfig
- Cshowip
- Dipconfig
- Esysinfo | grep ipaddress
How the community answered
(20 responses)- A15% (3)
- B75% (15)
- C5% (1)
- E5% (1)
Why each option
`ifconfig` is the classic Unix/Linux utility for displaying and configuring network interface parameters including IP addresses. The Windows equivalent `ipconfig` is not used on Linux systems.
`/proc/net/ipconfig` is not a valid or standard file path in the Linux proc filesystem; the relevant network info lives in paths like `/proc/net/if_inet6` and is not intended for direct user reading.
`ifconfig` (interface configuration) is the traditional command-line tool on Linux and Unix-like systems used to display the current network interface configuration, including assigned IPv4 and IPv6 addresses, netmask, and MAC address. It reads data from the kernel and presents it per interface, making it the standard tool for this task on Linux.
`showip` is not a standard command included in any common Linux distribution or networking package.
`ipconfig` is the Windows command for displaying IP configuration and does not exist as a built-in command on Linux systems.
`sysinfo` is not a standard Linux command, and piping it to `grep ipaddress` is not a valid or recognized method for retrieving IP address information.
Concept tested: Linux network interface IP address lookup command
Source: https://linux.die.net/man/8/ifconfig
Topics
Community Discussion
No community discussion yet for this question.