Running applications with elevated privileges
Elevated privileges let an account perform tasks that a standard user cannot.
An account with elevated privileges can be a root user, a superuser, an administrator, or a user with sudo privileges. It can change system settings and access protected files.
Enable elevated privileges
In the main menu, click .
Select a local Go Build or Go Test configuration.
On the Configuration tab, select Run with sudo. On Windows, select Run with elevated privileges.
Click OK to save the configuration.
Run or debug the configuration. If prompted, authorize the process in the system dialog.
Configure authorization time
If you do not want to authorize each time you run or debug an application with elevated privileges, you can configure the amount of time the authorization is kept. This is similar to how the sudo command-line program works by default.
GoLand does not have access to passwords. The system dialog manages authorization. After the configured time runs out, running elevated processes continue to run, but no new elevated process starts until you authorize it again.
Set the authorization period in the settings
You can also configure the time the authorization is kept in the settings.
Go to .
Select the Keep 'sudo' authorization for (Keep UAC authorization for) checkbox and specify the value. The default is 15 minutes.