Make the saved office profile an automatic-connection candidate when a suitable device becomes available.
Change the persistent property without activating it immediately.
Which command is appropriate?
connection.autoconnect yes makes a profile an automatic activation candidate. It is different from immediately activating the profile.
Detailed explanation
nmcli con up officeIncorrect. connection up activates office immediately.
Incorrect. connection up activates office immediately.
nmcli con mod office connection.autoconnect noIncorrect. Setting no disables automatic connection.
Incorrect. Setting no disables automatic connection.
nmcli dev connect officeIncorrect. device connect targets a device, not a profile property.
Incorrect. device connect targets a device, not a profile property.
nmcli con mod office connection.autoconnect yesCorrect. It enables the profile's autoconnect property.
Correct. It enables the profile's autoconnect property.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'connection.autoconnect=yes -> eligible for automatic activation'Expected result
connection.autoconnect=yes -> eligible for automatic activationKey points
- autoconnect is a profile property
- yes enables candidacy
- Immediate activation is separate
Notes
- Environment: property対応表の表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.