CompTIA Cloud+ Practice Test 2025 - Free CompTIA Cloud+ Practice Questions and Study Guide

Question: 1 / 735

What command can Donna run to collect her source IP address on the Linux bastion host?

curl /localhost/metadata/global/interface

ipconfig

ifconfig

The command that Donna should run to collect her source IP address on the Linux bastion host is ifconfig. This command is integral in managing network interfaces in Unix-like operating systems, including Linux. By using ifconfig, Donna can view detailed information about all of the network interfaces on the system. This includes the IP addresses currently assigned to each interface, along with other critical networking details such as the netmask and broadcast address.

In the context of identifying the source IP address, ifconfig provides a straightforward and effective means of retrieving this information directly from the system's network configuration. Additionally, ifconfig has been a long-standing command in Linux for network interface management.

The other options provided do not fulfill the requirement for gathering the source IP address:

- Using curl with a local address would not directly provide the needed information about the interface's source IP; it's more for fetching data from web resources.

- The command ipconfig is specific to Windows and won’t work in a Linux environment.

- While netstat is useful to inspect active connections and related network statistics, it does not typically display interface IP addresses directly.

Thus, ifconfig stands out as the appropriate choice for this task in a Linux setting.

Get further explanation with Examzify DeepDiveBeta

netstat

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy