A Linux administrator is tasked with adding a secondary IP address, 10.0.2.25/24, to the enp0s3 network interface. The change must be applied immediately without affecting the existing primary IP address and should not persist after a reboot. Which command should the administrator use?
The correct command is ip address add 10.0.2.25/24 dev enp0s3. The ip address command (which can be shortened to ip addr) is used to manage IP addresses on network interfaces. The add action assigns a new address to the device specified with dev. By default, changes made with the ip command are not persistent and will be lost after a system reboot.
ip route add 10.0.2.25/24 dev enp0s3 is incorrect because this command adds a static route to the routing table for the specified network; it does not assign an IP address to the interface itself.
ifconfig enp0s3 10.0.2.25/24 is incorrect. The ifconfig command is considered deprecated and has been replaced by the more powerful ip command. Additionally, this syntax is improper for adding an alias, and ifconfig typically uses a netmask (e.g., netmask 255.255.255.0) rather than CIDR notation.
ip link set enp0s3 address 10.0.2.25/24 is incorrect. The ip link set ... address command is used to modify the MAC (hardware) address of a network interface, not to assign an IP address.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why does the `ip address` command not persist changes after a reboot?
Open an interactive chat with Bash
Why is `ifconfig` considered deprecated in modern Linux systems?
Open an interactive chat with Bash
What is the difference between a MAC address and an IP address in networking?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .