A Linux administrator needs to change the network configuration for an existing connection profile named Office-LAN from DHCP to a static IP address. Which of the following commands will correctly modify the connection profile to use the IP address 192.168.10.50/24, gateway 192.168.10.1, and set the DNS server to 8.8.8.8?
nmcli con mod Office-LAN ipv4.method manual ipv4.addresses 192.168.10.50/24 ipv4.gateway 192.168.10.1 ipv4.dns 8.8.8.8
nmcli con mod Office-LAN method static ip4 192.168.10.50/24 gw4 192.168.10.1 dns 8.8.8.8
nmcli dev mod Office-LAN ipv4.method manual ipv4.addresses 192.168.10.50/24 ipv4.gateway 192.168.10.1 ipv4.dns 8.8.8.8
The correct command is nmcli con mod Office-LAN ipv4.method manual ipv4.addresses 192.168.10.50/24 ipv4.gateway 192.168.10.1 ipv4.dns 8.8.8.8. This command uses nmcli con mod to modify an existing connection. It correctly sets the IPv4 method to manual for a static configuration. It then specifies the static IP address and subnet mask (ipv4.addresses), the default gateway (ipv4.gateway), and the DNS server (ipv4.dns) using the proper property names. The command nmcli con add is incorrect because it is used to create a new connection, not modify an existing one. The command using nmcli dev mod is incorrect as dev is used to manage devices, not connection profiles, and it does not have the same options for setting IP configuration persistently. The command using ip4 and gw4 is incorrect because those property names are used when adding a new connection with nmcli con add, not when modifying one with nmcli con mod.
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.
What is the purpose of the `nmcli` command?
Open an interactive chat with Bash
Why is `ipv4.method manual` used in the correct command?
Open an interactive chat with Bash
What is the difference between `nmcli con mod` and `nmcli con add`?
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 .