You can import a WireGuard profile using the nmcli
command on Linux by following these steps:
- Create a new connection profile using the
nmcli
command:
nmcli connection import type wireguard file /path/to/profile.conf
This will import the WireGuard profile from the specified file and create a new connection profile with the same name as the file.
- Verify the imported profile by listing all the available connection profiles:
nmcli connection show
This will list all the available connection profiles, including the imported WireGuard profile.
- Enable the imported WireGuard profile:
nmcli connection up profile-name
This will activate the imported WireGuard profile and establish the connection.
- Verify the status of the connection
nmcli connection show profile-name
This will show the current status of the connection, including the IP address and other connection details.
- To delete the profile
nmcli connection delete profile-name
This will delete the profile you imported.
Please note that you need to have NetworkManager
installed on your Linux system to use the nmcli
command.