nmcli con up uuid <your-uuid-here>
To find out the UUID of the VPN connection, use:
nmcli -p con list
The command to disconnect from a VPN is:
nmcli con down uuid <your-uuid-here>
Assorted notes on my development experiences, and other useful workflow and environment tips, for Windows and Linux.
nmcli con up uuid <your-uuid-here>
nmcli -p con list
nmcli con down uuid <your-uuid-here>
#!/bin/bash
ReplyDelete#Use this script for automatic VPN Connection on startup for example:
UUID=`nmcli -p con list |& grep -Po 'Private Internet Access SSL \K.*?(?= )'`
nmcli con up uuid "$UUID"