Even while you may use practically any command-line environment with Windows 10’s Terminal (including Linux, PowerShell, and Command Prompt), it always runs in user mode by default.
Despite the fact that this behavior is intended, there are two ways to make the Windows Terminal run as an administrator at all times: either by changing the app’s settings or by utilizing a shortcut. By doing this, you may access the option without having to navigate via the app’s context menu.
This post will show you how to configure the command-line environment such that it always launches in elevated mode.
How to Make Windows Terminal Always
By default, launch Windows Terminal as an administrator.
To run all command consoles elevated through Windows Terminal on Windows 10, follow these steps:
- Get Windows Terminal going.
- Selecting the menu button next to the new tab choice will bring up the Settings option.
- From the list of “Profiles” options, choose “Defaults.”
- Turn on the “Run this profile as Administrator” toggle switch to make Command Prompt, PowerShell, and any other profile with elevated access launch automatically.
- enable Windows Terminal to run by default with administrator privileges.
From the menu, choose “Save.”
The next time you use Command Prompt, PowerShell, or any other command terminal, it will open elevated.
To start Windows Terminal as an administrator, always utilize the shortcut.
You may also create a shortcut on Windows 10 that you can tell to run as an administrator.
- To start Windows Terminal as an administrator every time you use a shortcut, adhere to these steps:
- Right-click Windows 10’s desktop.
- Select the Shortcut menu item under the New submenu.
- In the field for routes, type the following path:
- %LocalAppData%\Microsoft\WindowsApps\wt.exe
- Next, click the Next button.
- Check the shortcut’s name, such as Windows Terminal.
- From the menu, choose Finish.
- When you right-click the newly created shortcut, a context menu will appear where you may select Properties.
- Click the Shortcut tab.
- From the menu, choose “Advanced.”
- Make sure Run as administrator is chosen for the Windows Terminal shortcut.
- Run as administrator choice
Select the OK button. - If desired, use the Change Icon button.
- In the field marked “Look for icons in this file,” type the following path, then hit enter:
- %systemroot%\system32\shell32.dll
- Quick tip: If you want to use the Windows Terminal icon, you may download it from this link.
Select the icon of your choice. - Select the OK button.
- Click the Apply button.
- Select the OK button.
Double-click the shortcut once you’re done to start the Windows Terminal in administrator mode immediately.
You can drag the shortcut to the taskbar to make it permanent. Alternatively, you can right-click the shortcut and select the Pin to Start option to open the program in administrator mode from the Start menu.