Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

There is no single “program alias” setting: the right method depends on whether you want a shortcut in PowerShell or Bash, Windows Shell lookup for a desktop application, or a command name declared by a packaged Windows app. For a quick command-line shortcut, use a PowerShell alias or a Bash alias; use a function instead if the shortcut needs fixed arguments.

Choose the kind of alias you need

Where you want the shortcut Use Scope or persistence
PowerShell command line PowerShell alias; use a function if it needs arguments Current session, or later sessions when defined in the relevant profile
Bash command line Bash alias; use a function if it needs arguments Interactive shell; save the definition in a shell startup file to load it later
Windows Shell application lookup App Paths registry entry Per-user or per-machine
Packaged Windows desktop app Execution alias declared in the package manifest Declared by the app developer in the package

These mechanisms solve different problems. A PowerShell alias is not a Windows-wide executable registration, and an App Paths entry is not a shell alias.

Create a PowerShell alias for an executable

In PowerShell, use Set-Alias to give an executable a shorter command name. For example:

Set-Alias -Name mytool -Value 'C:ToolsMy Programprogram.exe'

Replace the example path with the executable’s actual location. The quoted path matters when it contains spaces. Microsoft describes Set-Alias as creating or changing an alias for a command, including an executable: Microsoft Learn: Set-Alias.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
BTXETUEL Copy Paste Search Backspace Save Cut All Enter 8-Key Keyboard SayoDevice One Handed OSU Keypad Programmable Mechanical Shortcut Macro Keyboard for Working and Gaming (Black)
  • 【Portable Mini Keyboard】Ultra-small size,attached detachable USB-C cable,effectively saves desktop space. You can connect the mini keyboard (plug and play) and a normal-size keyboard with the same computer at the same time, they will not interfere with each other.
  • 【Default function】 The default function of three keys is Copy,Paste,Search,Backspace,Save,Cut, All and Enter(Ctrl+C,Ctrl+V,Ctrl+F,Backspace,Ctrl+S,Ctrl+X,Ctrl+A,Enter).Plug and play,No software needed.Makes workflow super fast.
  • 【Other function】 You can also use other functions, such as Shortcut keys, Multi-step operation, Multi-key in one, Undo, Redo, Play, Pause, Volume, Switch song, Forward, Backward, etc. You can control the light color and gradient mode of the case you want through the software or website.
  • 【Programming by Website】 The Website is applicable to MacOS,Linux and also Windows Systems.We recommend that you try to use Chrome and Edge Browser to access the website! Website:SayoDevice.com
  • 【Device】 Programming will be saved on the device. You don't need to set it up again when you change the computer.If you encounter any problems with the keypad, please contact us, we will help you deal with it as soon as possible.

Make the alias persist in PowerShell

The command above creates the alias in the current PowerShell session. To load it in later sessions, add the definition to the profile used by the PowerShell host you open. Check the profile path with:

$PROFILE

Open that file in a text editor, add the Set-Alias line, and save it. If the profile file does not exist, create it before editing. PowerShell profiles are host-specific, so an alias in one host’s profile may not load in another. See Microsoft Learn: about_Aliases for alias and profile details.

Rank #2
Sale
XPPen Mini Keydial ACK05 Wireless Shortcut Keyboard Bluetooth Programmable Express Remote Control with Dial & Customized Express Keys for Drawing Tablet PC MacBook Windows Images Video Editing
  • Wireless Connection: ACK05 wireless shortcut keyboard supports bluetooth 5.0 connection directly, which is Good Design Award 2023 Winners, providing you a more flexible and clean workspace. You can also connect it via a Bluetooth dongle or USB cable. Total three ways connection bring you stable and fast transmission, also can meet your different work scenarios
  • Please Note: If you do not download the driver, it can only be used as a regular shortcut keyboard. However, if you wish to customize the keys or program it, you must download the driver and configure it accordingly. If your device is an iPad or runs on iOS, after receiving the product, you need to download the "Shortcut Remote" app on your device in order to properly set up and use this product properly
  • Compact Size with Large 1000 mAh Battery: The Wireless Shortcut Remote features a thin profile and weighs only 75 g, easy for one hand to hold. With built-in 1000 mAh battery ensures the continuous working for about 300 hours. Ready to speed up your creation whenever you grab it
  • Customize up to forty Shortcuts: The Wireless Shortcut Remote has ten keys. You are allowed to customize four sets through the driver -- up to forty shortcuts. To switch between the sets, you only need to press a single key. Its capability to work with different applications makes itself a powerful productivity tool not only for creation, but also for study, work, and gaming
  • Anti-Ghosting Performance: The Mini Keydial features a new technology of Anti-ghosting for all ten keys, you can control with multi-keys at the same time, which will give you more customizable possibilities

Use a function when the command needs arguments

PowerShell aliases map a name to a command; they do not bundle parameters or arguments. Define a function when you want the shortcut to run the executable with fixed options:

function mytool { & 'C:ToolsMy Programprogram.exe' --help }

Enter mytool to run that command. To make it persistent, put the function in the same relevant profile. The call operator & runs the quoted executable path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
VSD M18 Macro Pad Programmable Keypad, Stream Controller Streaming Deck, Customizable LCD keys, Gaming shortcut keyboard, USB sound board, Trigger actions in OBS, Twitch, YouTube, Works with PC Mac
  • 18 Programmable Keys Macro Keypad: This stream controller deck comes with 18 customizable macro keys (15 LCD visual keys + 3 physical buttons). Users may program single actions or multi-step sequences for daily operation. The keys support in-game combos, app launch and media playback control for multiple usage scenarios. Each LCD key accepts JPG, PNG and GIF images and animations to mark separate functions
  • Single Tap Control: This USB macro keyboard pad supports single tap commands for quick operation. Users can trigger pre-set macros, input text, open files and web pages, adjust media playback, or switch OBS scenes with one tap. The straightforward layout fits gaming, live streaming and professional office task setup
  • One Tap Multi-Shortcut: This macro controller pad streaming deck supports multi-shortcut macro programming for gamers and content creators. Custom shortcuts simplify game combo inputs, video editing, music production and photography workflows. The Operation Follow function runs multiple macro steps in custom order or simultaneous execution for adjustable task control
  • Adjustable RGB Surround Light Ring - VSD M18 gaming streaming deck features an outer RGB light ring with auto color cycle mode. Custom RGB tones are available via device firmware upgrade. The light ring offers adjustable visual lighting for dim gaming, streaming and night work setups.
  • Wide System Compatibility: This VSDinside macro control board works with Windows 11 and newer, macOS 11.0 and newer systems. Connect via USB-C cable for immediate use. It is compatible with mainstream software including OBS, Streamlabs, YouTube, Twitter, Discord, Excel, Word and Photoshop for daily production work. Native Linux system plug-and-play support is not available, while SDK development documents are provided for custom secondary development

Create an alias in Bash

For a simple command substitution in an interactive Bash shell, use the alias command:

alias ll='ls -l'

To remove it from the current shell, run:

unalias ll

Bash expands aliases in command position while reading interactive input; aliases are not expanded in noninteractive shells by default. To have an alias available in later interactive sessions, add its definition to the startup file used by your shell, commonly ~/.bashrc for interactive Bash. A Bash alias is not a reliable way to pass arguments: define a shell function when the shortcut needs to accept or fix arguments. The Bash manual page documents alias and function behavior.

Rank #4
NOVVAOGO Copy Keyboard, Cut Copy Paste Keypad, One Handed Macro Keypad, Programmable Mechanical Keyboard for Working and Gaming, Shortcut Keyboard for PC, MAC, Laptop (Black)
  • 【Portable & Easy to use】The one handed copy keyboard is super easy to use. Simply plug in and it’s ready to use. No software needed. This cut copy paste keyboard is also compact and portable.
  • 【Copy Keyboard】The default function of 3 keys is cut, copy and paste (For Window: Ctrl+X, Ctrl+C, Ctrl+V; For iOS: Command+X, Command+C, Command+V). This macro keyboard can be used on PCs, Macs, Laptops. *Mac User Notice* please set it in Windows before you can use it on Mac.
  • 【Customization】 Copy Keyboard default function is "Copy" / "Paste" / "Cut" . Functions can be set via software, such as Shortcut keys, Cut, Undo, Redo, Select all, Play, Pause, Volume, Switch song, Forward, Backward, Custom script, etc.
  • 【Enhance Your Work Efficiency】The mini 3 key mechanical keyboard helps to reduce strain, enhance productivity and maximize your output and reduce typing fatigue.
  • 【Perfect Gift Idea】The copy keyboard would be a perfect gift idea for your friends, co-workers, family member who work on computers a lot.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Register a Windows desktop app with App Paths

If your goal is for Windows Shell application lookup to find a desktop executable by its filename without changing the system-wide PATH, App Paths is a separate Windows registration mechanism. Microsoft documents these registry locations:

  • HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionApp Paths for a per-user registration.
  • HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionApp Paths for a per-machine registration.

Create a subkey named for the executable, such as program.exe, and set its default value to the executable’s fully qualified path. An optional Path value can specify a path prepended to PATH for that process. This is app registration for Shell resolution, not a PowerShell or Bash alias. Follow Microsoft’s application registration documentation and take care when editing the registry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Declare an execution alias for a packaged Windows app

For a packaged Windows desktop application, the developer can declare an execution alias in the app package manifest using the Windows app execution alias extension. This allows users and processes to start the packaged app by its declared command name rather than entering its full path. It is a packaging feature, not a setting for creating a personal shell alias. See Microsoft’s packaging extensions documentation.

Which method should you use?

  • Choose a PowerShell alias for a short name to run an executable from PowerShell, without extra arguments.
  • Choose a PowerShell function when the shortcut needs fixed parameters or more command logic.
  • Choose a Bash alias for a simple substitution in interactive Bash; use a function when arguments matter.
  • Choose App Paths when you are registering a conventional Windows desktop executable for Shell lookup.
  • Choose a manifest execution alias when you are developing and packaging a Windows app that should expose a command name.

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.