0

I want to import my vpn.conf file using nmcli and set autoconnect to 0, otherwise it defaults to 1

Apparently the correct way is by specifying --autoconnect=false flag, but this results in error.

nmcli connection import file vpn.conf type wireguard --autoconnect=false

Error: invalid extra argument '--autoconnect=false'

I am aware I can run a second command after, but this is extraneous, it should be settable upon import and saves running multiple commands

nmcli con mod <con> connection.autoconnect no
3
  • According to whom is that the correct way? The man-page doesn't mention it, and that agrees with the error message. Commented Feb 8 at 3:47
  • @tink perplexity.ai - Wont be using that again, aside from that, it sounded like a rational flag, it appears two commands have to be done to unset an automatic value from the first Commented Feb 8 at 5:27
  • Indeed. Two commands. And if you put that in a script it's not too bad. That's the problem with AIs, they don't have knowledge, the know what sounds good ;D Commented Feb 8 at 5:33

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.