There is no single system-wide setting called a “program alias.” The right method depends on where you want to type the shortcut: in PowerShell, in Bash, in Windows Shell app lookup, or to launch a packaged Windows app. For a quick command-line shortcut, use a shell alias; if it needs fixed arguments, use a function instead.
Choose the right kind of alias
| Where you want to use it | Use | Scope and persistence | Can include arguments? |
|---|---|---|---|
| PowerShell command prompt | PowerShell alias, or a function if arguments are needed | Current session; load the definition from a profile for later sessions | No for aliases; yes for functions |
| Bash interactive command line | Alias for simple substitutions; function for argument handling | Interactive shell; define it in a shell startup file to reuse it | No for aliases; yes for functions |
| Windows Shell application lookup | App Paths registry entry | Per-user or per-machine registration | Not a shell alias; maps an executable name to its path |
| Packaged Windows app | Execution alias declared in the app package manifest | Configured by the app developer in the package | Not a user-created shell alias |
Create a PowerShell alias for an executable
In PowerShell, Set-Alias can map a short command name to an executable. For example:
Set-Alias -Name editor -Value 'C:Program FilesExample Editoreditor.exe'
Replace the example path with the executable’s actual full path. Quote a path containing spaces. The alias is available in the current PowerShell session. Microsoft’s Set-Alias documentation describes it as creating or changing an alias for a command, file, or executable.
Make the alias persist
To have it in future sessions, put the definition in the PowerShell profile that is loaded by the host you use. Open the profile in that host with:
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute#1 Best Overall
notepad $PROFILE
Add the Set-Alias line, save the file, then open a new PowerShell session. PowerShell profiles are host-specific, so a profile used by one host may not be loaded by another. Microsoft explains profile-based persistence and alias behavior in about_Aliases.
Use a function when the command needs arguments
Aliases do not store parameters or arguments. If you want the shortcut to launch an executable with fixed options, create a function instead:
Rank #2
function editor-project { & 'C:Program FilesExample Editoreditor.exe' '--new-window' 'C:ProjectsDemo' }
Put the function in the same profile if you want it available in later sessions. The call operator & runs the quoted executable path.
Create an alias in Bash
For a simple command substitution in an interactive Bash shell, use:
Rank #3
alias ll='ls -l'
Type ll at the prompt to run the replacement. Remove it in the current shell with:
unalias ll
Bash expands aliases when it reads interactive input, typically in command position; aliases are not expanded in noninteractive shells by default. An alias also does not provide a way to handle arguments. Use a shell function when the shortcut must accept or arrange arguments. The Bash manual page documents alias expansion and functions.
Rank #4
- Book - powershell for sysadmins: workflow automation made easy
- Language: english
- Binding: paperback
When Windows App Paths is the better fit
If the goal is for Windows Shell application lookup to resolve an executable by name without adding its directory to the global PATH, App Paths registration is a different option. Microsoft documents these registry locations:
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionApp Pathsfor a per-user registration.HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionApp Pathsfor a per-machine registration.
Create a subkey named for the executable, such as example.exe, and set its default value to the executable’s full path. An optional Path value is prepended to the environment path for that process. This is Windows Shell application registration, not an alias that becomes available in a PowerShell or Bash session. See Microsoft’s application registration documentation.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Best Value
Packaged Windows apps: execution aliases
For a packaged Windows desktop app, the app developer can declare an execution alias in the package manifest using the app execution alias extension. This lets users and processes start the packaged app without typing its full path. It is configured as part of the app package, not created by adding a PowerShell profile line or a registry App Paths entry. Microsoft describes the manifest option in its packaging extensions documentation.
Quick Recap
Quick troubleshooting
- PowerShell says the alias is not recognized: confirm the definition ran in the current session, or that you added it to the profile loaded by this PowerShell host.
- The shortcut needs options or a folder argument: use a function rather than trying to place arguments in an alias.
- A Bash alias works at the prompt but not in a script: interactive aliases are not expanded in noninteractive shells by default; use a function or invoke the target command directly.
- You need a Windows app name resolved by the Shell rather than a shell command: investigate App Paths registration; it solves a different lookup problem from a PowerShell alias.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




