nerdexam
LPI

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.

The Power of the Command Line

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)
  • A
    15% (3)
  • B
    75% (15)
  • C
    5% (1)
  • E
    5% (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.

Aless /proc/net/ipconfig

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

BifconfigCorrect

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

Cshowip

`showip` is not a standard command included in any common Linux distribution or networking package.

Dipconfig

`ipconfig` is the Windows command for displaying IP configuration and does not exist as a built-in command on Linux systems.

Esysinfo | grep ipaddress

`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

#ifconfig#IP address#network commands#system information

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice