alias <name> <command>
Creates a named shortcut for a command or a sequence of commands. After defining the alias, you can run it from the console or use it inside a bind as if it were a built-in command. Aliases are commonly used to save crosshair, viewmodel, or buy presets under a short, memorable name.
Aliases do not persist across game restarts. To keep them, add the alias lines to your autoexec.cfg so they are re-created every time the game starts.
Examples
alias "d" "disconnect" - Typing d in the console now disconnects you from the server.
alias "q" "quit" - Typing q in the console now quits the game.
alias "donk_crosshair" "cl_crosshairstyle 4;cl_crosshairsize 1.5;cl_crosshairthickness 1;cl_crosshairgap -2;cl_crosshairdot 0;cl_crosshaircolor 1" - Defines a crosshair preset under one name. Run donk_crosshair in the console to apply the whole set in one go.