Different command interpreters handle command aliases in different ways.
Microsoft's CMD relies upon the Win32 console subsystem to provide its command aliasing mechanism. The
doskey command actually interacts with the process' console, and it is the console itself that holds aliases. Thus aliases are per-console and transient.
JP Software's TCC/LE handles aliases itself. The
alias command allows one to view and manipulate aliases, which are either "local" or "global". Aliases are still transient, but are either private to one command interpreter process or shared amongst all command interpreter processes (across all consoles).
Shells such as the Korn shell in the SFUA utility toolkit — whose tools run in the Subsystem for UNIX-based Applications that comes right there in the box with Windows 7 Ultimate edition and Windows Server 2008 R2 (For Windows XP, one can download and install Services for UNIX version 3.5.) — and the Bourne Again shell from cygwin similarly handle aliases themselves. Aliases are transient, and per command interpreter process.
Auto-loading a default initial set of aliases varies by command interpreter, too.
In all cases, one places commands to set the aliases in a script of some sort.
grawity has already given one of the two registry keys that cause Microsoft's CMD to run a command as it starts up. Unfortunately, this is per command interpreter process, even though the aliases themselves are stored per console. Start a secondary command interpreter from the initial one, and any manual changes to the default aliases will be reset. An alternative, that at least performs initialization only once per console, is to add the
/K option and the name of a command script that calls
doskey to the command tail in the shortcut that starts the command interpreter.
JP Software's TCC/LE automatically runs the
TCSTART script upon its startup. Again, this is per command interpreter process. However, TCC's "local" aliases are also per command interpreter process, so this is the right place to initialize aliases if one is employing local aliases. For global aliases, simply create a shortcut in your
Startup folder that loads aliases from a file (with
alias /r) and then runs the
shralias command so that they persist after that shortcut has finished running.
For the Bourne Again and Korn shells, simply do as one would with these shells on any other platform. Use the
alias command in the
$HOME/.bashrc scripts for the Bourne Again shell; and use the
alias command in the
$HOME/.profile, ENV, and
$HOME/.kshrc scripts for the Korn shell.