alias Command

Explore usage, syntax, and examples for the alias CS2 developer console command.

alias

CS2 and CSGO

Command

alias

<Alias><Command>

Use the alias command to create a custom shortcut in your console that runs a single command or multiple commands at once.

<Alias>

Enter the custom name you want to type in the console to run the assigned commands. For example, if you set this as "example", typing example will execute the commands you define.

<Command>

Enter the command or series of commands to run when the alias is used. For multiple commands, enclose them in quotes and separate each with a semicolon, like "buy ak47; buy p250".

sv_cheats Required

No

Client or Server Command

Client

Server

alias Generator

Command

alias

<Alias><Command>
0/2 Arguments Selected

Set the options below to auto-generate your command. When everything looks good, click the Copy button and paste it into your in-game console.

alias Examples

Command

alias

examplekill

This binds the command "kill" to the alias "example". Typing example will instantly kill your character.

Command

alias

example"sv_cheats 1; give weapon_ak47"

This creates an alias named "example" that enables cheats and gives you an AK-47 when typed in the console.

Command

alias

"rifle""buy m4a1; buy ak47"

This alias named "rifle" buys the rifle you need depending on your team. Typing "rifle" will buy either an AK-47 or your equipped M4 variant automatically.