Skip to content

Instantly share code, notes, and snippets.

@jhonoryza
Created February 9, 2023 17:40
Show Gist options
  • Save jhonoryza/b4bbfe42f15278649ff9f16c97afc76c to your computer and use it in GitHub Desktop.
Save jhonoryza/b4bbfe42f15278649ff9f16c97afc76c to your computer and use it in GitHub Desktop.
Connect to vpn or wifi from terminal

List all connections in NetworkManager:

$ nmcli con

Show information about the created VPN connection:

$ nmcli c show id [VPNConnectionName]

To connect to the L2TP VPN server from the command line:

$ nmcli c up [VPNConnectionName]

To disconnect from a VPN server, run:

$ nmcli c down [VPNConnectionName]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment