This article's documentation is for anything that uses the Source engine. Click here for more information.

Command line options: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (consistency)
 
(357 intermediate revisions by 73 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar}}
| ru = Command_Line_Options:ru
{{TabsBar|main=Command line options}}
| jp = Command_Line_Options:jp}}
[[File:Steam launch options example - Half-Life 2.png|thumb|right|Example of [[Half-Life 2]] launch options in [[Steam]], with {{code|-dxlevel 95 -high}} applied.|300px]]
== Source Games ==
'''Command line options''' (frequently '''command line arguments''' or '''command line parameters'''; '''launch options''' on [[Steam]]) are additional arguments specified before the program starts, these functionally change the behavior of the program in some way, such as launching the game and start the game with the specified map directly, or play a [[demo]] for example.


These command-line parameters will work with any [[Source]] engine games (Half-Life 2, Counter-strike: Source, etc.).
Command line arguments are traditionally prefixed with a hyphen ({{code|-}}), but some {{windows|2}} applications (especially system ones) will use a forward slash ({{code|/}}) instead. {{quake|2}} uses plus ({{code|+}}) as a prefix for [[console command]]s or [[cvar]]s that will get executed by the game as soon as it starts, and [[GoldSrc|all]] [[Source|Valve]] [[Source 2|engines]] inherit this syntax.
 
== Engine ==
 
These command-line parameters will work with any Source engine games ({{hl2|4}}, {{css|4}}, etc.).


{{syntax|hl2.exe <parameter1> <parameter2> <cvar1> <cvar2>}}
{{syntax|hl2.exe <parameter1> <parameter2> <cvar1> <cvar2>}}
Line 13: Line 17:
* Windows shortcuts pointing to <code>hl2.exe</code> directly.
* Windows shortcuts pointing to <code>hl2.exe</code> directly.
* Windows shortcuts pointing to <code>steam.exe</code> with the proper <code>-applaunch <AppID></code> specified (see '''Steam''' section below).
* Windows shortcuts pointing to <code>steam.exe</code> with the proper <code>-applaunch <AppID></code> specified (see '''Steam''' section below).
* Command-line batch script files launching these applications.
* Launch options on the game's properties in [[Steam]] library.
* Command-line batch script files launching these applications. For example: A bat file containing only "'''left4dead2.exe -dev -tools -nop4'''" to launch {{l4d2|4}} in tools mode.
* Linux shell scripts pointing to the application with launch options. <code>executable -command</code>


=== Examples ===
===Examples===
* <code>steam.exe -applaunch 280 -dev -console -sw +sv_lan 1 +map MyMap</code>
* <code>steam.exe -applaunch 240 -dev -console -sw +sv_lan 1 +map MyMap</code>
** This will launch {{Css|1}} with the specified map.
* <code>hl2.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust</code>
* <code>hl2.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust</code>
** Same as above but launched from the game executable directly, with the map {{code|de_dust}}. Note that latest version of {{css|1}} and other games on {{tf2branch|1}} has it's own executable name based on the game's {{code|[[File_structures_in_Valve_games#mod_folder|moddir]]}} ({{code|cstrike}}, {{code|dod}}, etc.), like {{code|cstrike.exe}} for {{Css|name}}, {{code|dod.exe}} for {{dods|1}}, {{code|hl2mp.exe}} for {{hl2dm|1}}, and so on. The {{code|-game cstrike}} command line parameter are also no longer required to be used for those games, as in the case of {{css|name}}, boots directly to {{css|name}} instead of {{hl2|name}} (which will always crash with a message "Could not load library client").
* <code>hl2_win64.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust</code>
**Same as above, but with 64-bit executable.


=== Command-line parameters ===
===Command-Line Parameters===
{| class="wikitable"
{| class="wikitable sortable"
! Argument !! Description
! Argument !! Description
|-
|-
| '''-autoconfig''' || Restores video and performance settings to default for the current hardware detected. Ignores settings inside any .cfg files until this parameter is removed.
| '''-adapter''' || Sets the GL graphics adapter. Default is 0.
|-
|-
| '''-32bit''' || Forces the engine to start in 32-bit mode. Only useful on [[wikipedia:64-bit|64-bit]] Operating Systems.
| '''-all_languages''' || Loads all language files.
|-
|-
| '''-adapter''' || Sets the GL graphics adapter. Default is 0.
| '''-allowdebug''' || Allows for debug modules to be loaded in games that disable them and fakes a debugger for phonehome, and is the same as -dev, unless -nodev is specified.
|-
| '''-allowmultiple''' {{since|{{portal2}}}} || Allows multiple Source games to run at the same time. Only works if a <code>VPROJECT</code> environment variable is set. Use <code>-multirun</code> instead for {{Src13|2}}. {{note|Source games that do not support this (or <code>-multirun</code>) can be run at the same time as a game that does, as long as the other game that doesn't support it was started first.}} {{note|In {{strata|2}}, both <code>-allowmultiple</code> and <code>-multirun</code> are supported, <code>VPROJECT</code> is not required, and using either will disable creating the Source mutex entirely, so any other game can still be started at the same time.}} {{confirm|Does this work on Mac/Linux?}}
|-
| '''-allowstalezip''' || Suppresses console warnings from stale.txt existing.
|-
| '''-allow_third_party_software''' {{only|{{csgo}}}} || Previously {{code|-untrusted}}, this launches the game in "Untrusted Mode", which allow third-party programs to injecting its code into game executable.
|-<!-- CSGO related command should be kept for historical and archival purposes, even if the game is unsupported or dropped. Some third-party CSGO branch games may also have one of these command line. -->
| '''-anticheat_settings''' {{only|{{apex}}}} || This command are most likely used to change Epic Games Launcher/Easy Anti-Cheat settings for the game. It was also used to enable Direct3D 12 (DX12), using {{Code|-anticheat_settings{{=}}SettingsDX12.json}}. Previously {{Code|-eac_launcher_settings}}.
|-
| '''-audiolanguage''' {{tf2|only}} || Changes the audio (spoken) language. Due to the way it works, only <code>-audiolanguage english</code> works. However, it is possible to make other languages to work.
|-
|-
| '''-allowdebug''' ||  
| '''-autoconfig''' || Restores video and performance settings to default for the current hardware detected. Ignores settings inside any .cfg files until this parameter is removed.
|-
|-
| '''-allowstalezip''' ||  
| '''-background {{var|<n>}}''' {{only|{{l4d2}}{{portal2}}}} || Forces the main menu background ID to the integer {{code|{{var|n}}}} for the current session.
|-
|-
| '''-basedir''' ||  
| '''-basedir''' || Sets the base directory for the game files. On Xbox 360 RFS, this is forced to smb://hostname/game.
|-
|-
| '''-bi''' ||  
| '''-bi''' || Defines the build identifier ID which is used in phonehome
|-
|-
| '''-bugbait''' || {{Todo|Is it for Bugbait E3 2003 demo?}}
| '''-bugbait''' || Used internally to tell the game it is loading a Bugbait (the name of the bug reporting system) bug report.
|-
|-
| '''-bugreporterdll''' || Name of the bug reporter DLL to use
| '''-bugreporterdll''' || Name of the bug reporter DLL to use
Line 43: Line 63:
| '''-buildcubemaps''' || Builds cubemaps when fully loaded into a map, then quits the game.
| '''-buildcubemaps''' || Builds cubemaps when fully loaded into a map, then quits the game.
|-
|-
| '''-conclearlog''' || Clears the <code>console.log</code> text file on start.
| '''-ccsyntax''' || Spew details about the localized strings we load.
|-
| '''-clientport'''|| Sets the client port. Default is 27002.
|-
|-
| '''-condebug''' || Logs all console output into the <code>console.log</code> text file.
| '''-collate''' || Skips everything, just merges the reslist from temp folders to the final folder again.
|-
|-
| '''-console''' || Starts the game with the [[Developer Console|developer console]] enabled. Same as having con_enable enabled.
| '''-conclearlog''' || Clears the <code>console.log</code> text file on start. Only works if -condebug set.
|-
| '''-condebug''' || Logs all console output into the <code>console.log</code> text file.
|-
| '''-console''' || Starts the game with the [[Developer Console|developer console]] enabled, and allows it to be opened even if <code>con_enable</code> is set to 0. Disables the automatic loading of menu background maps, except in {{hl2|1}} and {{portal|1}} - use <code>-nobackground</code> if you want this.
|-
| '''-deathsonly''' || Supposed to only count deaths while parsing tf2 gamestats, but actually pointless because there is only code for deaths.
|-
| '''-debugdxsupport''' || Writes debug DirectX information as keyvalues to the console as shader devices are loading configuration.
|-
| '''-debugsteam2wrapper''' {{only|{{srcsdk06}}{{srcsdk07}}}} || Writes debug information for files accessed through the Steam 2 Wrapper to the debugger. Includes creation and deletion of file handles. See [[Fixing VPK mounting for older Source SDK Bases]] for more information.
|-
|-
| '''-defaultgamedir''' || Fallback directory if "-game" is not set. Default is "hl2".
| '''-defaultgamedir''' || Fallback directory if "-game" is not set. Default is "hl2".
|-
|-
| '''-demo''' || Enters the game into demo mode. Only works for "hl2" and "portal"
| '''-demo''' || Enters the game into demo mode. Only works for Half-Life 2 and Portal
|-
| '''-dev''' || Enables the <code>developer</code> ConVar, which prints console output to the top-left of the screen and enables extra debug messages. Also has various other effects depending on the engine branch and game.
Disables the automatic loading of menu background maps, except in {{hl2|1}}, {{portal|1}} (use <code>-nobackground</code>), and {{p3|1}} (use <code>-nostartupmenu</code>).
|-
| '''-disable_d3d9ex''' {{csgo|only}} || Forcefully disables Direct3D 9Ex.
|-
|-
| '''-dev''' || Enables developer mode. Also disables the automatic loading of menu background maps and stops the quit dialog from appearing on exit.
| '''-disallowhwmorph''' || Same as <code>mat_disablehwmorph 1</code>. Disables HW morphing for particular mods.
|-
|-
| '''-dti''' || Prints the datatable when being sent
| '''-dti''' || Prints the datatable when being sent
|-
|-
| '''-dumpvidmemstats''' ||
| '''-dumpvidmemstats''' || Spews video memory statistics to vidmemstats.txt. This forces CModelLoader to quit.
|-
| '''-dvd''' || {{360}} Enables strict DVD mode. Allows loading files from DVD only. Xbox 360 only.
|-
| '''-dvddev''' || {{360}} Enables developer DVD mode. Allows loading files from a remote path as a fallback as well as the DVD. Xbox 360 only.
|-
|-
| '''-dxlevel <level>''' || Forces the game to start using specified DirectX API version. Officially supported values are: 60, 70, 80, 81, 90, 91, 95 (recommended), 98 (Xbox 360 only), and 100. After starting the game with this launch parameter, the selected value will be saved for future start ups and video settings will be temporarily reset (but not saved), so it is highly recommended to remove this launch parameter after first launch with it. See [[mat_dxlevel]].
| '''-dx9''' {{only|{{hl2}}{{hls}}{{l4d2}}{{portal}}{{p2}}{{tf2branch}}}} || {{Windows}} Forces the game to never use DXVK, even in cases where it would be automatically enabled (such as when {{code|-gamepadui}} is passed in). {{Note|To force OpenGL (using ToGL) on Linux, use {{code|-gl}} instead.}}
|-
|-
| '''-edit''' ||  
| '''-dxlevel <level>''' {{removed|{{l4d}}}} || Forces the game to start using specified DirectX feature levels. After starting the game with this launch parameter, the selected value will be saved for future start ups and video settings will be temporarily reset (but not saved), so it is highly recommended to remove this launch parameter after first launch with it. See [[mat_dxlevel]].<br>Please note that changing DirectX levels does not change the Direct3D renderer to use any other versions of Direct3D. All {{src|1}} games will always run on Direct3D 9 (or Direct3D 11/12 in some third-party games).
;Supported values{{colon}}
:60 (DX6, Source 2004/2006 only)<br>
:70 (DX7, Source 2004/2006 or RTX Remix games only)<br>
:80 (DX8)<br>
:81 (DX8.1)<br>
:90 (DX9.0 / SM 2.0)<br>
:92 (equivalent to both "90" and "95". Mac/Linux only, translates [[Direct3D|DirectX]] to [[OpenGL]] using [[ToGL]]). Has partial SM 3.0 support.<br>
:95 (DX9.0+ / SM 3.0, default on modern hardware)<br>
:98 ({{360|1}} only, always enabled)<br>
:100 ({{l4dbranch|2}}, {{sfm|2|nt=0}} and {{dota2|2}} pre-Reborn only, always enabled)<br>
{{Warning|If you are using Vulkan renderer ({{code|-vulkan}}), having dxlevel set lower than 90 (such as 80/81) will cause graphical glitches and crashes the game.<br>Similarly, playing on maps that ship with custom models/props which only support {{code|dxlevel 90}} or higher can cause the game to crash on {{code|dxlevel 81}} or lower.}}
|-
|-
| '''-endgamevid''' ||  
| '''-edit''' || According to comments, intended to replace -tools. Does nothing except disable all file logging for building reslists.
|-
| '''-enablefakeip''' {{only|{{tf2}}}}|| Tells [https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay Steam Datagram Relay] to use a "FakeIP" and an anonymous server ID when local server hosting.
|-
| '''-endgamevid''' || If specified startup videos will not be skipped, and EndGameVids.txt will be used instead of StartupVids.txt. This can also be invoked by the command "startupmenu playendgamevid", which bails back to the menu and plays the end game video.
|-
|-
| '''-exit''' || Quits the game after fully loading into a map.
| '''-exit''' || Quits the game after fully loading into a map.
|-
|-
| '''-filmgrain''' ||  
| '''-fake_stale_server''' || {{csgo}} Skip check game version from Steam and goes straight to '''out-of-date''' state
|-
| '''-force32bit''' {{tf2branch|only}} || Forces the game to run in 32-bit mode, even if running on a 64-bit operating system. {{note| Windows: Create new shortcut from 32-bit executable program and add in launch parameter -force32bit, launch game from shortcut.}}
|-
| '''-force64bit''' {{tf2branch|only}} || Forces the game to run in 64-bit mode.
|-
| '''-filmgrain''' || Enables the {{code|filmgrain}} screen space effect. Crashes the game on {{hl2}}. In {{dods}} effect works and enabled by default
|-
| '''-floathdr''' || Forces HDR to use float values.
|-
| '''-flushlog''' || Causes log files to be flushed to disk once per second (rather than after every 4kbytes of log data).
|-
| '''-forceallmips''' || Always load mipmaps below 32x32, regardless of if the "no minimum mipmap" [[VTF]] flag is enabled.
|-
| '''-forcenovsync''' || Forces vsync to be disabled.
|-
|-
| '''-flushlog''' || Causes log files to be flushed to disk once per second (rather than after every 4kbytes of log data).
| '''-forcestartupmenu''' || Forces the background menu map to always load, even if developer mode is active or the game is loading straight to a level.
|-
|-
| '''-forcestartupmenu''' ||  
| '''-forcexboxreconfig''' || {{360}} Forces default config settings to be loaded on Xbox 360.
|-
|-
| '''-forcexboxreconfig''' || Forces default config settings to be loaded on Xbox 360.
| '''-force_device_id''' {{Csgo|since}} {{also|{{Src13}}}} ||rowspan="2"| Forces the GPU to be recognized as a different graphics card depending on the vendor set. This is used for either debugging purposes or for graphical workarounds, such as avoiding an Intel crash in L4D2 when both Shaders and Memory Pool are set to high, aswell as forcing the "High" shadows setting to be shown on systems with Intel GPUs. {{tip|{{code|-force_vendor_id 0x10DE -force_device_id 0x0191}} will force the game to recognizing the GPU as a Nvidia GeForce GTX 1080 Ti (most Source games will detect this as "NVIDIA Unknown" according to {{Code|[[dxsupport.cfg]]}}).<br>And {{code|-force_vendor_id 0x10DE -force_device_id 0x1088}} will force the game to be recognized as GeForce GTX 590, which was listed in {{Code|dxsupport.cfg}} (in most Source games, some may only recognizes older GPUs), and set most of the graphical settings to high by default.
}}
|-
|-
| '''-forever''' || 
| '''-force_vendor_id'''
|-
|-
| '''-full_memory_dumps''' ||
| '''-forever''' || When you get to the end of the maplist, start over from the top
|-.
| '''-freq <rate>''' || Same as -refresh
|-
|-
| '''-fullscreen''' or '''-full''' || Forces the engine to start in fullscreen mode.
| '''-fs_log''' || Starts creating a batch file to copy files at the specified filename. This works on the latest engine branch.
|-
|-
| '''-g15''' || Enables Logitech G15 support. G15 is only supported in [[SiN Episodes: Emergence]]. {{confirm}}
| '''-fs_logbins''' || Logs binaries to the batch file from -fs_log.
|-
|-
| '''-game''' || Sets game or mod directory to load the game from. Usually is set by default if not user specified. Default is "-defaultgamedir"'s setting.
| '''-fs_nopreloaddata''' || Loads in the precompiled keyvalues data for each type. Works only with dedicated servers.
|-
|-
| '''-gamestatslogging''' ||  
| '''-fs_target''' || Sets the target game directory to copy files to, used with -fs_log.
|-
|-
| '''-gamestatsloggingtofile''' ||  
| '''-full_memory_dumps''' ||  
|-f
| '''-fullscreen''' or '''-full''' || Forces the engine to start in fullscreen mode.
|-
|-
| '''-h <height>''' || Forces the engine to start with resolution set to <code><height></code>. Ex: <code>-h 768</code>
| '''-g15''' || Enables Logitech G15 support. G15 is only supported in {{sineps|4}}. {{confirm}}<br>{{MConfirm|Does this also works with other Logitech G series keyboards with LCD screens, such as G19?}}
|-
|-
| '''-height <height>''' || Same as -h
| '''-game''' || Sets game or mod directory to load the game from. Usually is set by default if not user specified. Default is "-defaultgamedir"'s setting. If -defaultgamedir is not set, "hl2" is used.
|-
|-
| '''-heapcheck''' ||
| '''-gamepadui''' || {{hl2}}{{hls}}{{portal}}{{ez2}} Enables the [[Gamepad UI in mods|alternate controller-friendly UI used on Steam Deck]], and since {{hl2}} 20th Anniversary Update (and {{Portal}} May 2025 update), makes VGUI elements larger.<br>{{l4d2}}{{portal2}}{{tf2branch}} Makes various UI elements larger. In {{tf2branch|1}}, also makes VGUI elements bigger.<br>When used, keyvalues in VGUI resource files tagged with {{code|$DECK}} will evaluate as true. This is used by default on {{steamdeck|4}} and in {{ez2|4}}; use <code>-nogamepadui</code> if the original UI is desired.<br>This also automatically enables DXVK (except {{hl2}} and {{hls}} since 20th anniversary, and {{portal}} since May 2025 update); use {{code|-dx9}} to prevent this. Only present with updates released since 2020 - 2022 in any of those games.<br>{{Note|On {{portalrtx|2}}, to enable Gamepad UI, you must use {{code|-dx9}} alongside it, otherwise it would break the renderer.}}{{Bug|Gamepad UI is also available on {{hls|2}} due to shared binaries with {{hl2|2}}, but is broken.}}
|-
|-
| '''-heapsize <kilobytes>''' || Specifies the heapsize (in kilobyte) the game will use. This [http://store.steampowered.com/news/4371/ no longer exists] on the [[Source 2009]].
| '''-gamestatslogging''' || Enables game stats logging.
|-
|-
| '''-hideconsole''' ||  
| '''-gamestatsloggingtofile''' || Enables game stats logging out to a file, gamestats.log. Passing this parameter automatically forces -gamestatslogging.
|-
|-
| '''-high''' || Sets the game's priority to High
| '''-gamestatstag <tag>''' || Tags each map reported with the specified tag.
|-
|-
| '''-hijack''' || Take control of an existing instance of the game, if any, instead of complaining about already running.
| '''-gl''' {{only|{{tf2branch}}}} || {{linux}} Forces the game to runs on OpenGL instead of Vulkan (through DXVK). You can also select "Legacy OpenGL" option when launching the game on Steam (if available), to force OpenGL. <!-- not available on Windows -->
|-
|-
| '''-hushasserts''' ||  
| '''-gl_enablesamplerobjects''' || {{linux}} Use OpenGL Sampler Objects for better texture preloading
|-
|-
| '''-hushsteam''' ||  
| '''-gl_texclientstorage''' || {{macos}} Reduce memory usage by relying on GPU memory instead of a host copy
|-
| '''-heapcheck''' || {{windows}} Check if the heap isn't damaged or empty at the initiation of the game and every frame
|-
| '''-heapsize <kilobytes>''' || Specifies the heapsize (in kilobyte) the game will use. <br>This [http://store.steampowered.com/news/4371/ has been since deprecated] on later version of {{src09|4}} and {{srcmp|4}}, but can still be changed through console commands ({{code|mem_min_heapsize}} and {{code|mem_max_heapsize}})
|-
|-
| '''-insecure''' || Disable VAC.
| '''-height <height>, -h''' || Forces the engine to start with resolution set to <code><height></code>. Ex: <code>-h 768</code>
|-
|-
| '''-internalbuild''' || Causes the bug reporter panel to be drawn as internal
| '''-hideconsole''' || Forces the console hidden, whatever parameters are passed. This overrides -console, -dev, and all others.
|-
|-
| '''-ip''' ||
| '''-high''' || Sets the game's priority to High.<br>{{Bug|In {{Apex|2}}, this may cause the game into thinking that there is a Origin update available. [https://imgur.com/SwRjOWJ A screenshot of this issue can be found here].}}
|-
|-
| '''-language %l''' || Sets the game language to the one specified. (Examples: "english", "german").
| '''-hijack''' || Take control of an existing instance of the game, if any, instead of complaining about already running.
|-
|-
| '''-leakcheck''' ||  
| '''-host''' || Sets hostname. On Xbox 360, this sets the host computer name to be used for RFS. Xbox name must be <HostPC>_360.
|-
|-
| '''-low''' || Sets the game's priority to Low.
| '''-hushasserts''' || Disables a number of asserts in core Source libraries, skipping some error checks and messages.
|-
|-
| '''-makedevshots''' || Used for taking screenshots, causing entities to not fade. Enables the use of the devshots_nextmap concommand
| '''-hushsteam''' ||  
|-
|-
| '''-makereslists''' || "// Get precached sound count and store manifest if running with -makereslists"
| '''-ignoredxsupportcfg''' || Skips reading DirectX support file, dxsupport.cfg.
|-
|-
| '''-mat_aaquality''' ||  
| '''-insecure''' || Disable [[Valve Anti-Cheat]] (VAC).
|-
|-
| '''-mat_antialias''' ||  
| '''-internalbuild''' || Causes the bug reporter panel to be drawn as internal
|-
|-
| '''-mat_vsync''' ||  
| '''-interactivecaster''' {{csgo|only}}|| Starting your client with this will switch it into camera man mode (reference tv_allow_camera_man_steamid/tv_allow_camera_man_steamid2)
|-
|-
| '''-maxdownloadfilesizemb''' || CS:GO 5/1/2014, client launch option -maxdownloadfilesizemb N if clients needs to download even larger files from community servers.
| '''-ip''' || Does the same as the ipname Cvar
|-
|-
| '''-maxplayers''' ||  
| '''-language {{var|<language>}}''' || Sets the game language to the one specified. (Examples: "english", "german").
|-
|-
| '''-minmemory''' ||
| '''-leakcheck''' || Dumps statistics about memory leaks.
|-
|-
| '''-navanalyze''' ||  
| '''-limitvsconst''' || Limits the number of vertex shaders to a maximum of 256.
|-
|-
| '''-navforceanalyze''' ||  
| '''-localcser''' || Sets a custom gamestats CSER other than the Steam-provided public one (default is steambeta1:27013)
|-
|-
| '''-netspike''' ||  
| '''-log_opened_files''' || Logs all opened files to {{code|opened_files.txt}} file. (useful for debugging which files are failing to load)
|-
|-
| '''-noassert''' ||
| '''-low''' || Sets the game's priority to Low
|-
|-
| '''-noborder''' || When used with the game set to windowed mode, will make the game act as if in fullscreen mode (no window border).
| '''-lv''' || Short for low violence. Enables German censorship like <code>-sillygibs</code> in {{tf2|2}} with blood/gore disabled.
|-
|-
| '''-nobreakpad''' ||
| '''-makedevshots''' || Used for taking screenshots, causing entities to not fade. Enables the use of the devshots_nextmap concommand. Also disables the automatic loading of menu background maps.
|-
|-
| '''-noclearsave''' ||
| '''-makereslists''' || Makes reslists. Need to run with -textmode. Passing a parameter here uses a script file to control more complex makereslists operations (multiple passes, etc.)
|-
|-
| '''-nocrashdialog''' || Suppresses some 'memory could not be read' unhandled errors.
| '''-mat_softwaretl''' || Enables software vertex processing.
|-
|-
| '''-nodev''' ||
| '''-mat_vsync''' || Enables Vertical Sync
|-
|-
| '''-nodns''' ||
| '''-maxdownloadfilesizemb''' || CS:GO 5/1/2014, client launch option -maxdownloadfilesizemb N if clients needs to download even larger files from community servers.
|-
|-
| '''-noforcemaccel''' || Use the Windows mouse acceleration settings. Only works if -useforcedmparms is set.
| '''-maxdxlevel''' || Limits the maximum <code>dxlevel</code> to use. Default is 0.
|-
|-
| '''-noforcemspd''' || Use the Windows mouse speed settings. Only works if -useforcedmparms is set.
| '''-maxplayers''' || Set the maximum players allowed to join the server. This does the same as the maxplayers convar, the maximum you can set it to is limited by the game/mod.<br>{{note|In {{csgo|4}}, Maxplayers is deprecated, and should either be set in <code>gamemodes_server.txt</code> or with '''-maxplayers_override'''.}}
|-
|-
| '''-nogamedll''' || Game will crash when you are loading maps
| '''-minmemory''' || Set startup memory to mem_min_heapsize ?*1024 * 1024?
|-
|-
| '''-nogamestats''' ||  
| '''-monitorTextureSize''' || Set the size of the texture used to render [[point_camera]]s.
|-
|-
| '''-nohltv''' ||
| '''-multirun''' {{Src13|only}}{{also|{{strata}}}} || Allows the game to run even if another Source game is already open. {{note|Source games that do not support this (or <code>-allowmultiple</code>) can be run at the same time as a game that does, as long as the other game is started first.}} {{note|In {{strata|2}}, both <code>-allowmultiple</code> and <code>-multirun</code> are supported, and using either will disable creating the Source mutex entirely, so any other game can still be started at the same time.}} {{note|Not supported in {{sfm|2|nt=0}}. Multirun is still possible by starting other games first as explained above.}} {{Bug|On some systems, running the game after another Source game is already open, cause the menu logo and/or menu options to become invisible|tested={{css|2}} and {{hl2|2}}}} {{Note|Windows only. Does not work on Linux. Mac untested.}}
|-
|-
| '''-noip''' ||
| '''-navanalyze''' || Used for developer purposes when launching a map. Immediately analyzes the navigation map of the loaded map to provide data about hiding spots and other data. [[Nav Mesh Commands]]
|-
|-
| '''-NoLoadPluginsForClient''' ||  
| '''-navforceanalyze''' || Used for developer purposes when launching a map. Forces an immediate navigation analyze even if the action is not necessary to perform.
|-
|-
| '''-nomaster''' ||  Disable client authentication
| '''-netconport <number>''' {{l4d|since}} || Creates a remotely accessible server console on the specified port. This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
|-
|-
| '''-nomessagebox''' ||
| '''-netconpassword <password>''' {{l4d|since}} || If set, users must type PASS "password" to use the remote console described above
|-
|-
| '''-nominidumps''' ||
| '''-netspike''' || Sets the trace threshold to the specified value (the limit of the number of records that will be written to netspike.txt before all records are removed).
|-
|-
| '''-nomouse''' ||  
| '''-newdialogs''' || Forces new Steam dialog to be used.
|-
|-
| '''-nop4''' || Forces the Engine to bypass Perforce Integration
| '''-no_texture_stream''' {{only|{{tf2}}}}{{confirm}} || Disables the use of lower quality textures while higher quality versions load, favoring immediate loading of higher quality textures. Disabling texture streaming can improve performance on systems with GPUs that have low VRAM. Can be found on [https://wiki.teamfortress.com/wiki/Ultra_high_settings Ultra high settings] on the Official Team Fortress Wiki or [https://wiki.teamfortress.com/wiki/Scripting#Launch_Options a wiki dedicated to TF2 command line options].
|-
|-
| '''-nopreload''' || Forces models to not be preloaded. Takes priority over cl_forcepreload and -preload.
| '''-no_compressed_verts''' || Disables vertex compression for shaders.
|-
|-
| '''-nopreloadmodels''' || Same as -nopreload
| '''-no_compressed_vvds''' || Enables thin VVD data, even if the client is not an Xbox 360.
|-
|-
| '''-NoQueuedPacketThread''' ||
| '''-noassert''' || Allows attaching to a debugger instead of directly asserting.
|-
|-
| '''-norebuildaudio''' ||
| '''-noasync''' || Disables asynchronous filesystem access.
|-
|-
| '''-noshaderapi''' ||
| '''-nobackground''' {{only|{{hl2}}{{portal}}}} || Prevents background maps from loading, displaying only static background images instead. {{note|Added in the HL2 Anniversary Update (and corresponding Portal update). Prior to this, <code>-dev</code> and <code>-console</code> would automatically disable background maps.}}
|-
|-
| '''-nosound''' || Disables sound support
| '''-noborder''' || When used with the game set to windowed mode, will make the game act as if in fullscreen mode (no window border), commonly refers to '''Borderless Windowed mode'''. <br>This will allows you to switching between application and the game (Alt+Tabbing) without a 2-3 seconds delay. It is only supported in {{src07|4}} and above, and can be changed in menu starting with {{l4dbranch|4}}, later available in {{gmod|4}}, some {{src13|4}} games (such as {{hl2|4}} with Steam Deck update) and some third-party Source games.<br>For games that does not support borderless windowed mode, you can use third-party software such as Borderless Gaming, or {{pcgw|Glossary:Windowed#Force_borderless_fullscreen_windowed_mode|other listed here at PCGW}}.
|-
|-
| '''-NoVConfig''' ||
| '''-nobots''' || Allows Counter-Strike server hosts to force bots disabled to enforce CPU limits.
|-
|-
| '''-novid''' || When loading a game with this parameter, the intro Valve video will not play.
| '''-nobreakpad''' || Disable the ''Breakpad'' crash handler.
|-
|-
| '''-override_vpk''' || Forces actual files to override VPK.
| '''-noclearsave''' || Skips clearing the save directory after restoring a save.
|-
|-
| '''-particles''' ||  
| '''-noconvert''' || {{360}} "No conversions during retail"
|-
|-
| '''-phonehome''' || Unknown, used in Portal 2 IHV build.
| '''-nocrashdialog''' || Stop some windows crash message boxes from showing up.
|-
|-
| '''-pidfile''' ||
| '''-nod3d9ex''' {{only|{{srcmp}} {{src13}}}} {{also|{{tf2branch}}}} || Forcefully disables Direct3D 9Ex.
|-
|-
| '''-pme''' ||
| '''-nodefaultmap''' || (Linux only{{confirm}}) Supresses the addition of -map
|-
|-
| '''-port <variable>''' || Sets port for a listen server. Default is 27015.
| '''-nodev''' || Disables -dev and -allowdebug during startup so sv_cheats and developer mode dosent get set.
|-
|-
| '''-preload''' ||  
| '''-nodns''' || Disable DNS requests and resolving DNS adresses.
|-
|-
| '''-primarysound''' || If surround sound isn't enabled, forces the use of the primary sound buffer
| '''-nodttest''' || Skips datatable testing.
|-
|-
| '''-publicbuild''' ||
| '''-noff''' || Disables force feedback for controllers.
|-
|-
| '''-random_invariant''' ||
| '''-noforcemaccel''' || Use the Windows mouse acceleration settings. Only works if -useforcedmparms is set.
|-
|-
| '''-replay''' || increase maxplayers by 1 at startup and automatically execute replay.cfg for the server.
| '''-noforcemspd''' || Use the Windows mouse speed settings. Only works if -useforcedmparms is set.
|-
|-
| '''-rebuildaudio''' ||
| '''-nogamedll''' || Do not load the Game DLL, this most likely will cause your game/server to crash
|-
|-
| '''-recapvid''' ||  
| '''-nogamepadui''' || Overrides <code>-gamepadui</code>, forcibly disabling its effects when they would otherwise be automatically turned on (such as on Steam Deck or in {{ez2|4}}).
|-
|-
| '''-ref''' || Sets MATERIAL_INIT_REFERENCE_RASTERIZER on the shader material adapter
| '''-nogamestats''' ||  
|-
|-
| '''-refresh <rate>''' || Force a specific refresh rate. Ex: <code>-refresh 60</code>
| '''-nohltv''' || Disable [[SourceTV]]
|-
|-
| '''-refreshrate <rate>''' || Same as -refresh
| '''-noip''' || Do not bind to an ip and disables all multiplayer support
|-
|-
| '''-freq <rate>''' || Same as -refresh
| '''-nojoy''' {{not|{{L4D2}}}} || Disables joystick support.
|-
|-
| '''-requirecubemaps''' ||  
| '''-nomaster''' || Hides server from master serverlist.
|-
|-
| '''-resizing''' ||  
| '''-nomenuvid''' {{only|{{L4D}}{{L4D2}}{{portal2}}}} || Disables main menu background videos. In the {{l4dseries|4}}, it will render the game startup image instead. In {{portal2|4}}, it will render a static image corresponding to the video that would have been used.
|-
|-
| '''-reslistdir''' ||
| '''-nomessagebox''' || Stop various windows error message boxes from showing up
|-
|-
| '''-reuse''' ||
| '''-nominidumps''' || Dont write minidumps
|-
|-
| '''-rpt''' || Same as having -condebug, -conclearlog, and -console enabled
| '''-nomouse''' || Disables in-game mouse support.
|-
|-
| '''-safe''' ||  
| '''-NoLoadPluginsForClient''' ||  
|-
|-
| '''-soft''' || Enables Software hardware rendering mode.
| '''-nop4''' || Forces the Engine to bypass Perforce Integration
|-
|-
| '''-shaderapi''' ||  
| '''-nophysx''' {{only|{{p3}}}} || Completely disable [[W:PhysX|NVIDIA PhysX]] physics engine, used for cloth simulation on Postal Dude's coat, but also prevent {{Code|[[p3_prop_cloth]]}} entities (which uses PhysX) from displaying.
|-
|-
| '''-sillygibs''' ||  
| '''-nopreload''' || Forces models to not be preloaded. Takes priority over cl_forcepreload and -preload.
|-
|-
| '''-small''' ||
| '''-nopreloadmodels''' || Same as -nopreload
|-
|-
| '''-sndcachedebug''' || Prints sound cache debug messages (developer must be enabled to see)
| '''-nops2b''' || Disables Pixel Shader 2b support.
|-
|-
| '''-snoforceformat''' || Skips sound buffer creation
| '''-noqueuedload''' || Disables queued loading of map resources.
|-
|-
| '''-spewsentences''' || Spew out vox sentence names during reslist generation
| '''-NoQueuedPacketThread''' || {{linux}} No queued packet thread will be created.
|-
|-
| '''-startmap''' ||
| '''-norebuildaudio''' || Opposite of and overrides -rebuildaudio for the map reslist generator.
|-
|-
| '''-startstage''' ||  
| '''-norfs''' || {{360}} Forces Remote Filesystem disabled. Xbox 360 only.
|-
|-
| '''-steam''' || Enables Steam support (if the game is launched from Steam, this is enabled by default). Working directory must be Steam directory. Works only for singleplayer games.
| '''-norussian''' {{only|{{p3}}}} || Preventing the game from switching to Russian language (Russian retail copies only).
|-
|-
| '''-steamlocal''' || Same as -steam.
| '''-noshaderapi''' || Loads a non-existent shader API dll, {{code|shaderapiempty.dll}}. Effectively disables shader and texture loading completely. May be useful with -textmode to load the game quickly since a GUI is not required.
|-
|-
| '''-steamport''' ||  
| '''-nosound''' || Disables sound support {{Warning|{{Src13}}causes crash of the game on startup}}
|-
|-
| '''-strictportbind''' || If you launch the game with this option it will quit with an error message if it can't bind to the default or specified port.
| '''-nosrgb''' || Disables support for SRGB.
|-
|-
| '''-sv_benchmark''' ||
| '''-nostartupmenu''' {{only|{{p3}}}} || Prevent the game from loading the main menu map if used alongside {{code|-dev}}. <span id="nostartupmenu"></span>
|-
|-
| '''-swapcores''' ||
| '''-nostartupsound''' || Disables menu music (<code>sound/ui/gamestartup*.mp3</code>) to play on startup.
|-
|-
| '''-tempcontent''' ||
| '''-nosteamcontroller''' || Disables Steam controller system<br>{{Note|This does not disable Steam Input whatsoever.}}
|-
|-
| '''-testscript <filename>''' || Loads a .[[vtest]] file.
| '''-nouserclip''' || Uses software clipping instead of hardware user clip planes
|-
|-
| '''-testsub''' ||  
| '''-novid''' || When loading a game with this parameter, the intro video will not play.
|-
|-
| '''-textmessagedebug''' ||  
| '''-NoVConfig''' || Prevents the filesystem you nexem library from running VConfig if it encounters a filesystem error where it cannot find the game content.{{Todo|Fix grammar.}}
|-
|-
| '''-textmode''' || Runs the game without graphics
| '''-olddialogs''' || Forces old Windows dialogs instead of new Steam ones. {{Todo|Does it do anything nowadays?}}
|-
|-
| '''-threads''' ||  
| '''-override_vpk''' || Forces actual files to override VPK.
|-
|-
| '''-timedemoloop''' ||  
| '''-particles''' || Sets the number of beam trails to allow (2048 by default, minimum is 512).
|-
|-
| '''-toconsole''' || Starts the engine directly in the console, unless a map is specified with <code>+map</code>.
| '''-phonehome''' || If debug mode is also enabled, forces the init of phonehome? which handles some build information and sends them via netmessages to steam?
|-
|-
| '''-tools''' || Enables [[engine tools]].
| '''-pidfile <pidfile>''' || Use the specified <pidfile> to store the server pid. Default is srcds.pid{{confirm}} (Unix/Linux only).
|-
|-
| '''-trackdeletions''' ||
| '''-pixel_offset_x''' || Sets the pixel offset to translate on the X axis in MatSystemSurface.
|-
|-
| '''-tvmasteronly''' || Only one person allowed in HLTV.
| '''-pixel_offset_y''' || Sets the pixel offset to translate on the Y axis in MatSystemSurface.
|-
|-
| '''-usedevshotsfile''' || Does nothing
| '''-playtest''' || Tells the engine to record the names of all sounds played via {{code|S_StartSound}} call without any of the sound flags {{code|SND_CHANGE_PITCH}}, {{code|SND_CHANGE_VOL}}, and {{code|SND_STOP}}. {{note|You may dump this list of sounds using ''ConCommand'' {{command|snd_dump_filepaths}}.}}{{Bug|In {{L4D2|4}}, ''ConCommand'' {{command|snd_dump_filepaths}} will ignore ''ConVar'' {{code|snd_store_filepaths}} and attempt to write to an inaccessible hard-coded path.}}
|-
|-
| '''-useforcedmparms''' || Allows the use of -noforcemspd and -noforcemaccel.
| '''-pme''' || Activate the performance monitoring events code, this again only works on Intel processors newer then PENTIUM4
|-
|-
| '''-uselogdir''' || Logs various data to logs/(mapname)/*
| '''-port <variable>''' || Sets port for a listen server. Default is 27015.
|-
|-
| '''-usercon''' || Enable RCON for Counter-Strike: Global Offensive servers
| '''-preload''' || Does the same as the sv_forcepreload Cvar. If -nopreload or -nopreloadmodels, this behaviour is disabled
|-
|-
| '''-usereslistfile''' ||
| '''-primarysound''' || If surround sound isn't enabled, forces the use of the primary sound buffer
|-
|-
| '''-usetcp''' ||
| '''-profile''' || If using Xbox360 or enabling this, additional debugging information are logged like the map startup time and similar
|-
|-
| '''-vcrrecord''' ||  
| '''-publicbuild''' || Is this build a public one? If not, phonehome will not post information of this build to steam
|-
|-
| '''-vguimessages''' ||  
| '''-r_emulate_gl''' || Emulates OpenGL on Windows, provides a framerate boost for most GPUs<br>{{Confirm|Doesn't seems to work at all. RTSS and other overlays applications still report it as DirectX 9.}}
|-
|-
| '''-vproject''' ||
| '''-random_invariant''' || Forces the game's random number generator value to be invariant.
|-
|-
| '''-w <width>''' || Forces the engine to start with resolution set to <code><width></code>. Ex: <code>-w 1024</code>
| '''-rebuildaudio''' || Forces rebuild of _other_rebuild.cache (metacache) file at exit for the map reslist generator.
|-
|-
|'''-width <width>''' || Same as -w
| '''-recapvid''' || RecapVids.txt will be used instead of EndGameVids.txt. This can also be invoked by the command "startupmenu playrecapvid", which bails to the mainmenu and plays the recap video.
|-
|-
| '''-wavonly''' || Disables DirectSound and makes the engine attempt to play all sounds in PCM format.
| '''-ref''' || Sets MATERIAL_INIT_REFERENCE_RASTERIZER on the shader material adapter.
|-
|-
| '''-window''' || Forces the engine to start in windowed mode
| '''-reflectionTextureSize''' || Set the size of the texture used to render the [[Water_(shader)|Water shader]]'s real-time reflection and refraction.
|-
|-
| '''-sw''' || Same as -window
| '''-refresh <rate>''' || Force a specific refresh rate. Ex: <code>-refresh 60</code>
|-
|-
| '''-startwindowed''' || Same as -window
| '''-refreshrate <rate>''' || Same as -refresh
|-
|-
| '''-windowed''' || Same as -window
| '''-remote''' || Sets the remote file path to be used with -dvddev.
|-
|-
| '''-x <x position>''' || In borderless windowed mode, determines where the window should be horizontally. Ex: <code>-x 0</code>
| '''-replay''' || Increases maxplayers by 1 at startup and automatically executes replay.cfg for the server.
|-
|-
| '''-y <y position>''' || In borderless windowed mode, determines where the window should be vertically. Ex: <code>-y 0</code>
| '''-requirecubemaps''' || If a map dosen't have cubemaps, the game will promt up with "Map X does not have cubemaps!"
|-
|-
| '''+connect''' || Console Command
| '''-resizing''' || Allows resizing the window lower than a specific resolution.
|-
|-
| '''+load''' || Console Command
| '''-reslistdir''' || Default is "reslists", use this to override. Reslist generator only.
|-
|-
| '''+mat_hdr_level''' || Console Command
| '''-reuse''' || Reuse network sockets
|-
|-
| '''+maxplayers''' || Console Command
| '''-rpt''' || Remote perf testing. Same as having -condebug, -conclearlog, and -console enabled
|-
|-
| '''+playdemo''' || Console Command
| '''-ru''' {{p3|only}} || Set the game language to Russian.
|-
|-
| '''+port''' || Console Command
| '''-safe''' || Enables video safe mode, which sets the game to windowed, the width to 640, the height to 480, refresh rate to default, and disables antialiasing.
|-
|-
| '''+timedemo''' || Console Command
| '''-shader''' || Loads a specific shader library instead of depending on hardware. Debug only.
|-
|-
| '''+timedemoquit''' || Console Command
| '''-shaderdll''' || Loads a different shader dll. Default is shaderapidx9.dll. {{Todo|Is this the same as -shader?}}
|}
 
=== Console variables ===
* '''+<console variable> <arg>''' - Sets the Cvar (or [[:Category:Console_Variables|console variable]]) to the specified setting.
 
==== Some useful console variables ====
{| class="wikitable"
! Argument !! Description
|-
|-
| '''+map <map-name[.bsp]>''' || Loads the map specified after the engine starts.
| '''-shadersondemand''' || Creates shaders on access, helps reduce D3D memory for tools, but causes I/O hitches.
|-
|-
| '''+map_background <map name>''' || Forces a specified background map to be used. Useful for testing custom background maps. To avoid loading standard background maps for speed reasons, use the <code>-dev</code> command-line parameter.
| '''-sillygibs''' {{tf2|only}} || Forces gibs to be spawned as random [https://wiki.teamfortress.com/wiki/Gibs#Silly_gibs common objects].
|-
|-
| '''+sv_lan <0/1>''' || When set to 1, launches the game in LAN mode. Useful to stop players from joining your game from the Internet.
| '''-skiploadingworkshopaddons''' {{asrd|only}}|| Only load addons from the addons folder, not subscriptions on the Steam Workshop.
|-
|-
| '''+sv_cheats <0/1>''' || When set to 1, starts the game with cheats enabled.
| '''-small''' || Allow window sizing smaller than 640x480
|-
|-
| '''+physcannon_mega_enabled 1''' || Makes Gravity gun a super gravity gun
| '''-sndcachedebug''' || Prints sound cache debug messages (developer must be enabled to see)
|-
|-
| '''+cl_showfps <0/1/2/3>''' || When set to 2, shows the framerate and map name.
| '''-snoforceformat''' || Skips sound buffer creation
|}
 
== Goldsource Games ==
These command-line parameters will work with any [[Goldsource]] engine games (Half-Life, Counter-Strike, etc.).
 
{{syntax|hl.exe <parameter1> <parameter2> <cvar1> <cvar2>}}
 
=== Usage ===
These options can be used with:
* Hammer editor [[Hammer_Run_Map_Normal|Run Map]] dialog.
* Windows shortcuts pointing to <code>hl.exe</code> directly.
* Windows shortcuts pointing to <code>steam.exe</code> with the proper <code>-applaunch <AppID></code> specified (see '''Steam''' section below).
* Command-line batch script files launching these applications.
* Game launch options from Steam's Library.
 
=== Examples ===
* <code>steam.exe -applaunch 70 -dev -console -sw +sv_lan 1 +map MyMap</code>
* <code>hl.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust</code>
 
=== Command-line parameters ===
* '''-game <[[Game Name Abbreviations|game]]>''' - Specifies which game/mod to run. Default is "valve".
* '''-dll <name.dll>''' - Specifies which game DLL to use. Ex: <code>-dll dlls/zbotcz.dll</code>.
* '''-condebug''' - Stores console output to "Half-Life\qconsole.log".{{Note|Can be toggled with '''condebug''' console command.}}
* '''-dev''' - Enables developer mode.
* '''-glext''' - When paired with "-dev" setting, outputs all OpenGL extensions supported by your graphics card.{{Note|Can do the same with '''gl_dump''' console command.}}
* '''-gl''' - Sets the rendered to OpenGL.
* '''-soft''' - Sets the rendered to Software.
* '''-full''' - Forces the engine to start in fullscreen mode.
* '''-window''' or '''-sw''' or '''-startwindowed''' or '''-windowed''' - Forces the engine to start in windowed mode.
* '''-w <width>''' or '''-width <width>''' - Forces the engine to start with resolution set to <code><width></code>. Ex: <code>-w 1024</code>.
* '''-h <height>''' or '''-height <height>'''- Forces the engine to start with resolution set to <code><height></code>. Ex: <code>-h 768</code>.
* '''-stretchaspect''' - The game by default adds black bars based on your game screen resolution. Use '''-stretchaspect''' on your command line if you want the old behavior back (just always fill the screen). Setting "-nofbo" also implies "-stretchaspect".
* '''-freq <variable>''' - Force a specific refresh rate when running in fullscreen AND your monitor supports the frequency in question. {{Note|If you don't have a CRT monitor chances are you can't use this option.}}
* '''-mousethread''' - If set we poll the mouse position in another thread running at 100hz by default, to get better movement accuracy. Set the "m_mousethread_sleep" cvar to the number of seconds to sleep between mouse polls to change this rate.
* '''-joy_advanced''' - Use advanced joystick options (allows for multiple axes).
* '''-joy_advr, -joy_advu, -joy_advv, -joy_advx, -joy_advy, -joy_advz''' - {{Todo}}
* '''-nosound''' - Disables sound support. {{Note|Can do the same with '''nosound <0 or 1>''' console command.}}
* '''-nocdaudio''' - Disables mp3 support. Also disallows '''cd''' console command to load mp3 tracks.
* '''-wavonly''' - Disables DirectSound and makes the engine attempt to play all sounds in PCM format.
* '''-nointro''' - Disables intro movies.
* '''-noip''' - Disables network support.
* '''-noipx''' - Disables IPX support.
* '''-nojoy''' - Disables joystick support.
* '''-nomouse''' - Disables in-game mouse support.
* '''-noforcemparms''' - Forces the engine to use operating system mouse parameters.
* '''-noforcemaccel''' - Forces the engine to use operating system mouse acceleration.
* '''-noforcemspd''' - Forces the engine to use operating system mouse speed.
* '''-nofbo''' - Disables using the new method for rendering.
* '''-nomsaa''' - Disables MSAA (Anti-Aliasing), setting "-nofbo" also implies "-nomsaa".
* '''-noborder''' - When used with the game set to windowed mode, will make the game act as if in fullscreen mode (no window border).{{Bug|Doesn't hide window border, only control buttons.}}
* '''-nodirectblit''' - Disables direct blitting (Blit is shorthand for "block image transfer" or bit blit).
* '''-nobots''' - Disables bots.
* '''-port <port>''' - Specifies which port to use for client connections for a listen server. Default is 27015.{{Note|Can do the same with '''port''' console command.}}
* '''-demoedit''' - Enables hidden Demo editor.{{Note|Use '''viewdemo''' console command to get access.}}
* '''-num_edicts <variable>''' - Sets the entity limit for map/game entities (not temporary entities, which is still locked to 500). 900 is default. 4096 is a good limit, beyond that seems to cause hunk_alloc errors{{confirm}}. Both clients and servers need matching values for best compatibility{{confirm}}.
* '''-heapsize <kilobytes>''' - Specifies the amount of heap(or free store - cache, an area of memory used for dynamic memory allocation) the engine will use. Minimum value is 14336(14 MB). Maximum value is 131072(128 MB). By default this is set to 40960 (40 MB) and automatically adjusted to suit your system.{{Note|Low value causes "Unable to allocate X.X MB" exit error.}}
* '''-zone <bytes>''' - Specifies the amount of Bytes of memory for use with the console system.{{Note|Low or very high value causes [[Z_malloc|Z_Malloc]] exit error.}}
* '''-exec <file>''' - Executes specific config file immediately after the engine is loaded.
* '''+<console variable> <arg>''' - Sets the Cvar (or [[console variable]]) to the specified setting.
 
==== Useful console variables ====
* '''+_setgamedir <[[Game Name Abbreviations|game]]>''' - Specifies which game/mod to run.
* '''+_setrenderer <variable>''' - Sets the rendering mode. Available parameters are '''opengl''' and '''software'''.{{Note|Parameter '''D3D''' is deprecated.}}
* '''+_setvideomode''' - {{Todo}}
* '''+_set_vid_level <0 or 1>''' - Toogles "Low video quality".
* '''+_setaddons_folder <0 or 1>''' - Toogles "Allow custom addon content".
* '''+_sethdmodels <0 or 1>''' - Toogles "Enable HD models if available".
* '''+clientport <port>''' - Specifies which port to use to communicate with a server. Default is 27005.
* '''+gg <demoname>''' or '''+cl_gg 1 +playdemo <demoname>''' - Runs the demo in Game Gauge mode. This is a benchmark utility that runs through a demo as fast as possible and stores the framerate in the file fps.txt in the GameMod directory.
* '''+log on''' or '''+log off''' - Toogles logging before the engine loads config files.
 
==== Deprecated command-line parameters ====
* '''-console''' - Enables console. Can be opened either from menu (button in top-left corner in old Half-Life builds or button in main menu in new builds), or by pressing tilde (~) in-game.{{Note|Always enabled by default.}}
* '''-toconsole''' - Opens the console right when the game is launched.{{Note|No longer works.}}
* '''-gldrv <driver name>''' - Selects the GL Driver. The two choices are "Default" and "3dfxgl.dll".{{Note|No longer works.}}
* '''-d3d''' - Sets the rendered to Direct3D.{{Note|Removed.[http://steamcommunity.com/games/70/announcements/detail/1028213937978037958]}}
* '''-vid_mode <variable>''' or '''-vt <variable>''' - Sets the rendering mode. Available parameters are '''gl''' and '''software'''.{{Note|No logner works. Use '''-gl''', '''-soft''' or '''-d3d'''(see above) instead.}}
* '''-16bpp''' - Forces 16-bit color mode (bit depth).{{Note|Not allowed.}}
* '''-32bpp''' - Forces 32-bit color mode (bit depth).{{Note|Enabled by default.}}
* '''-nowinmouse''' - Don't capture mouse in-game.{{Note|Renamed to '''-nomouse'''.}}
* '''-gamegauge <demoname>''' - Runs the demo in Game Gauge mode. This is a benchmark utility that runs through a demo as fast as possible and stores the framerate in the file fps.txt in the GameMod directory.{{Note|Use console commands instead.}}
* '''-numericping''' - Displays ping in server browsers in milliseconds instead of dots.{{Note|Enabled by default.}}
* '''-particles <variable>''' - The number of particles for which to set aside buffer space.{{Note|No longer works.}}
* '''-nosierra''' - Disables Sierra logo on pre-Steam versions of GoldSrc games that have it.
* '''-noaff''' - Disables setting of thread affinity.{{Note|No longer works.}}
 
== Steam (Windows) ==
 
These command-line parameters work when launching the Steam application (<code>steam.exe</code>) under Windows.
 
=== Command-line parameters ===
{| class="wikitable"
! Argument !! Description
|-
|-
| '''-applaunch [[Steam Application IDs|<appID>]] [launch parameters]''' || Launches an Game or Application through Steam.
| '''-soft''' || Enables Software hardware rendering mode.
|-
|-
| '''-cafeapplaunch''' || Launch apps in a cyber cafe context (Forces apps to be verified / validated before launch).
| '''-softparticlesdefaultoff''' || Sets particles to be rendered without feathering (scene depth blending) by default.
|-
|-
| '''-clearbeta''' || Opts out of beta participation (in case for some reason it can't be done via settings).
| '''-softparticlesdefaulton''' || Opposite of -softparticlesdefaultoff.
|-
|-
| '''-complete_install_via_http''' || Run installation completion over HTTP by default.
| '''-spewsentences''' || Spew out vox sentence names during reslist generation
|-
|-
| '''-console''' || Enables the Steam debug console tab.
| '''-startmap''' || Restarts devshot generation at the specified map if resuming from a crash.
|-
|-
| '''-ccsyntax''' || Spew details about the localized strings we load.
| '''-startstage''' || When running from script file, this starts at specified stage, and sets current work item (default is 0). Reslist generator only.
|-
|-
| '''-debug_steamapi''' || Enables logging of Steam API functions.
| '''-startwindowed, -windowed, -window, -sw''' || Forces the engine to start in Windowed mode.
|-
|-
| '''-developer''' || Sets the 'developer' variable to 1. Can be used to open the VGUI editor by pressing F6 or VGUI zoo by pressing F7. Intended for skin development.
| '''-steam''' || Enables Steam support (if the game is launched from Steam, this is enabled by default). Working directory must be Steam directory. Works only for singleplayer games.
|-
|-
| '''-fs_log''' || Log file system accesses.
| '''-steamlocal''' || Similar to -steam. Runs Steam in local filesystem mode (all content off HDD), as opposed to remote filesystem mode (requiring Steam backend).
|-
|-
| '''-fs_target''' || Set target syntax.
| '''-steamport''' || Master server updater port. Steam authentication port is this port + 1. (default is 26900)
|-
|-
| '''-fs_logbins''' || Log the binaries we load during operation.
| '''-strictportbind''' || If you launch the game with this option it will quit with an error message if it can't bind to the default or specified port.
|-
|-
| '''-forceservice''' || Run Steam Client Service even if Steam has admin rights.
| '''-sv_benchmark''' || Enables benchmarking through sv_benchmark_force_start.
|-
|-
| '''-gameoverlayinject''' || Sets the method how GameOverlay is injected.
| '''-swapcores''' || Swaps threads for the particle and material systems each init
|-
|-
| '''-install <path>''' || Install a product from a specified path (e.g. "D:" for the DVD-ROM drive if D: is one).
| '''-tempcontent''' || Searches for game content in a folder called "_tempcontent" relative to the absolute game path. This option is enabled by default for Portal 1
|-
|-
| '''-installer_test''' || changes installing a retail game to emit all files to install_validate/ folder instead of to the steam cache.
| '''-testscript <filename>''' || Loads a .[[vtest]] file.
|-
|-
| '''-language <language>''' || Sets the Steam language to the one specified. (Examples: "english", "german").
| '''-testshaders''' || Loads the shader_test library. Debug only.
|-
|-
| '''-login <nowiki><[username]|anonymous></nowiki> [password]''' || Logs into Steam with the specified Username and Password combination. '''Note:''' Steam must be off for this to work.
| '''-testsub''' ||  
|-
|-
| '''-lognetapi''' || Logs all P2P networking info to log/netapi_log.txt.
| '''-textmessagedebug''' || Spews client text messages to console.
|-
|-
| '''-log_voice''' || Writes voice chat data to the logs/voice_log.txt file.
| '''-textmode''' || Runs the game without graphics, and instead launches a command prompt that displays the [[Developer Console]] outputs. Additionally, if the game is already running, launching the game with this command will simply boot the game up, instead of displaying the message "Only one instance of the game can be running at one time." (like {{code|-allowmultiple}} or {{code|-multirun}}).
|-
|-
| '''-noasync''' || Don't use async file operations, run them synchronous instead.
| '''-threads''' || Number of threads to allocate for the thread pool, default is 3
|-
|-
| '''-nocache''' || Starts steam with no cache (Steam must be off for this to work properly).
| '''-tickrate''' || Sets the game tick interval. Disabled in code for {{tf2|4}} because "server ops are abusing it". Also disabled in {{css|4}}, {{dods|4}}, {{l4d|4}} and {{l4d2|4}}.<br>In older versions on some of those games, or using [[Source_Multiplayer_Networking#Server_plugins|server plugins]], or by enabling it in the code, it can be changed.
|-
|-
| '''-noverifyfiles''' || Prevents from the client from checking files integrity, especially useful when testing localization.
| '''-timedemoloop''' ||  
|-
|-
| '''-no-dwrite''' || Forces vgui to use GDI text even if DWrite support is available.
| '''-toconsole''' || Starts the engine directly in the console, unless a map is specified with <code>+map</code>.
|-
|-
| '''-script <file name>''' || Runs a Steam script. All scripts must be in a subdirectory of the Steam folder called test scripts (Steam must be off for this to work).
| '''-tools''' || Enables [[engine tools]].
|-
|-
| '''-shutdown''' ||Shuts down (exits) Steam.
| '''-trackdeletions''' || Logs what files are marked for deletion in Reslist Generator.
|-
|-
| '''-silent''' || Suppresses the dialog box that opens when you start steam. It is used when you have Steam set to auto-start when your computer turns on. (Steam must be off for this to work).
| '''-tvmasteronly''' || Only one person allowed in HLTV.
|-
|-
| '''-single_core''' || Force Steam to run on your primary CPU only.
| '''-unrestricted_maxplayers''' {{tf2|only}} || Set the maximum players allowed to join the server. Unlike -maxplayers, this can allow for up to 100 players in a single server.<br>{{Warning|This feature is unsupported and not recommended, causing stability issues at maximum players.}}
|-
|-
| '''-tcp''' || Forces connection to Steam backend to be via TCP.
| '''-usedevshotsfile''' || Get map list from specified file, default is to build for maps/*.bsp
|-
|-
| '''-voice_quality''' || Sets audio quality, range [1,3].
| '''-useforcedmparms''' || Allows the use of -noforcemspd and -noforcemaccel.
|-
|-
| '''-voicerelay''' || Only allow 'relay' connections for voice (testing).
| '''-usegh''' || Loads ghostinj.dll to allow support for third party dlls (gamehost)
|-
|-
| '''-tenfoot''' || Start Steam in Big Picture Mode.
| '''-uselogdir''' || Logs various data to logs/(mapname)/*
|}
 
== HldsUpdateTool (Windows), steam (Linux) ==
'''Syntax:''' <code>hldsupdatetool -command <command> [parameters] [flags]</code>
 
=== Commands ===
*'''-command update''' - Install or update HLDS.
*'''-command version''' - View installed versions.
*'''-command list''' - View available games.
 
=== Parameters for the update command ===
*'''-beta <betaname>''' - Name of the beta (optional parameter for taking part in a beta test)
*'''-game [[Game Name Abbreviations|<game>]]''' - The name of the game to install (see [[Dedicated Server Name Enumeration|enumeration]]).
*'''-dir <installdir>''' - HLDS Install directory (if dir not specified, will use value from last run of tool).
The following parameters are only needed to access limited content.
*'''-username <username>''' - Steam account username
*'''-password <password>''' - Steam account password
 
=== Flags for the update command ===
*'''-verify_all''' - Verify all HLDS files are up to date.
*'''-retry''' - Automatically retry every 30 seconds if the Steam Network is busy.
*'''-remember_password''' - Remember password (if a username is supplied).
 
=== Optional parameters for all commands ===
 
*'''-nobootstrapupdate''' - Do not check for updates to the update tool
 
== SteamCMD ==
The Steam Console Client or [[SteamCMD]] is a new tool to install and update dedicated servers using a command line interface. It only works with games that have switched over to the SteamPipe content system. Eventually all Steam games will switch from HLDSUpdateTool to this.
 
{{syntax|steamcmd.exe <parameter1> <parameter2> <cvar1> <cvar2>}}
 
To view the most up to date version of SteamCMD commands visit this GitHub repo:
https://github.com/dgibbs64/SteamCMD-Commands-List
 
=== Usage ===
* <code>steamcmd.exe +COMMAND1 [ARG] +COMMAND2 [ARG]</code>
* <code>steamcmd.exe +runscript SCRIPTFILE</code>
 
=== Command-line parameters ===
{{Todo}}
=== Commands ===
{| class="wikitable"
! Argument !! Parameter(s) !! Description
|-
|-
| api_logging || <enabled> <verbose> || Enable/disable verbose API logging in SteamCMD
| '''-usercon''' || Enable RCON for Counter-Strike: Global Offensive servers
|-
|-
| app_build_all_depots || [-desc <text>] -depotconfigpath <folder> -contentroot <folder> -buildoutput <folder> <appid> || Build all depots for one app
| '''-usereslistfile''' || Get map list from specified file, default is to build for maps/*.bsp. Reslist generator only.
|-
|-
| app_dlc_status || app_status <appId> <dlcId> ||
| '''-usetcp''' || Disable TCP support
|-
|-
| app_info_print || || Dumps app info for appID
| '''-vcrplayback''' || Plays back a VCR recording. Nothing is simulated on the server, but all server packets are recorded. Note: VCR recording and playback only fully working on a leaked HLS build, other games and versions crash
|-
|-
| app_info_print || ||Dumps app info for appID
| '''-vcrrecord''' || Records a client's game and allows you to play it back and reproduce it exactly. Requires -nosound See [https://www.youtube.com/watch?v=I8YDS46MwS0 this] video on how it is different.
|-
|-
| app_info_request || <AppID> || Issue an appinfo request for the given appid. Does not wait for results from the server.
| '''-vguifocus''' || Enables debug VGUI messages related to input focus.
|-
|-
| app_info_update || <nowiki>[0|1]</nowiki> || Trigger app info update, optionally for update all
| '''-vguimessages''' || Enables debug VGUI messages.
|-
|-
| app_license_request || <AppID> || Requests a free licenses for this app if not already owned.
| '''-vproject''' || Manually sets the VProject directory to load game content for tools.
|-
|-
| app_set_config || <AppID> <key> <value> || Sets a config value for given app.
| '''-vulkan''' {{only|{{hl2}}{{hl2dm}}{{hls}}{{hldms}}{{css}}{{dods}}{{l4d2}}{{portal}}{{p2}}{{tf2}}}} || Enables the use of the DXVK library to translate Direct3D graphics calls to the [[Vulkan]] API. On Windows, where Direct3D itself is supported, this is of little use and should usually not be enabled (except in {{portal2}}, where it can be used to work around some specific rendering bugs). On Linux, it is usually recommended for games which support it, due to providing better performance and less graphical issues compared to the OpenGL translation layer usually used on this platform. <br> A newer version of the respective games from 2021-2025 or later, and a graphics card that supports Vulkan (such as {{nvidia|3.1}} GeForce 600-series/Kepler-based, AMD GCN 1.0 (or later) and Intel Skylake) are required in order to enable DXVK. {{Warning|Enabling DXVK may crash the game if a third-party program tries to hook its overlay to the game unsuccessfully, and/or your GPU does not support Vulkan.}}
|-
|-
| app_set_update_flag || <appId> ||
| '''-vxconsole''' || {{360}} Waits for Valve Xbox console to initialise. Xbox 360 only.
|-
|-
| app_status || <appId> ||
| '''-wavonly''' || Disables DirectSound and makes the engine attempt to play all sounds in PCM format.
|-
|-
| app_stop || <appid> <nowiki>[force:0|1]</nowiki> || Stop this running app
| '''-x <x position>''' || In borderless windowed mode, determines where the window should be horizontally. Ex: <code>-x 0</code>. '''Note:''' Setting this to 0 will make it align with the left side of your main monitor, rather than its center. Negative values also aren't accepted.
|-
|-
| app_uninstall || [-complete] <appId> ||
| '''-xnet_bypass_security''' || {{360}} Disables Xbox 360 secure networking, to allow cross-platform testing.
|-
|-
| app_update || <appid> [-validate] [-language <lang>] [-beta <betaname>] [-betapassword <pwd>] || Make sure a Steam application is up-to-date
| '''-y <y position>''' || In borderless windowed mode, determines where the window should be vertically. Ex: <code>-y 0</code>. '''Note:''' Setting this to 0 will make it align with the top side of your main monitor, rather than its center. Negative values also aren't accepted.
|-
|-
| app_update_cancel || <EAppUpdateError> ||
|'''-width <width>, -w''' || Forces the engine to start with resolution set to <code><width></code>. Ex: <code>-w 1024</code>
|}
 
==== Deprecated Command-Line Parameters ====
 
{| class="wikitable sortable"
! Argument !! Description
|-
|-
| apps_installed || ||
| '''-lowmemworkshop''' {{csgo|only}} || Allow updating very large map files on Steam Workshop. While the option still works, Valve most likely no longer allow users to upload CS:GO items to Workshop in favor of CS2.
|-
|-
| apps_running || || Displays information about running games tracked by Steam
| '''-mat_aaquality''' || Set CSAA quality level, does the same as the Convar mat_aaquality. This no longer works on most modern GPUs (starting with NVIDIA GeForce 750Ti/800M/900 series).<br>{{Confirm|Does not work on latest version/Source 2013 as the console command with the same name remains unchanged. Confirm whether this does anything on older engine.}}
|-
|-
| async_disconnect || || Async disconnect
| '''-mat_antialias''' || Antialiasing. Can be set to 8, amount past 8 won't sharpen the edges of game world.<br>{{Confirm|Also does not work on latest version/Source 2013. Confirm whether this does anything on older engine.}}
|-
|-
| build_installer || <project file> <target folder> [beta key] [beta pwd] ||
|}
 
=== Console commands on startup ===
* '''+<console command> <arg>''' - Runs command in console shortly after [[autoexec.cfg]] is executed. These are run by ConCommand {{cmd|stuffcmds}} issued from [[valve.rc]].
 
==== Useful console commands ====
{| class="wikitable sortable"
! Console commands !! Description
|-
|-
| ceg_wrap || <appid> <orig filename> <stripped filename> <strips filename> || Upload executable to back end for CEG wrapping
| '''+cl_showfps <0/1/2/3>''' || When set to 2, shows the framerate and map name.
|-
|-
| cm_force_change || || Change CM List
| '''+connect''' || Immediately connects to a server address.
|-
|-
| device_authorize_status || || Prints device authorization status
| '''+load <save name>''' || Immediately loads the save specified after the engine starts.
|-
|-
| download_depot || <appid> <depotid> [<target manifestid>] [<delta manifestid>] [<depot flags filter>] || Download a single depot
| '''+map <map name[.bsp]>''' || Immediately loads the map specified after the engine starts.
|-
|-
| download_sources || || Dumps list of download sources
| '''+map_background <map name[.bsp]>''' || Forces a specified background map to be used. Useful for testing custom background maps. To avoid loading standard background maps for speed reasons, use the <code>-dev</code> command-line parameter.
|-
|-
| drm_wrap || <appid> <input filename> <output filename> <toolname> <flags> || Upload executable to back end for DRM wrapping
| '''+mat_hdr_level''' || Sets HDR level (off, LDR/SDR with Bloom, and HDR) before the background map loads. See [[HDR Lighting Basics]].
|-
|-
| dump_scheduled_functions || || Displays internal Steam function callback timers
| '''+maxplayers <number>''' || Sets maxplayers. This will set maxplayers before the background map loads. To change when running, run <disconnect> to escape the current map, including background maps.
|-
|-
| exit || || Stops Steam client console
| '''+physcannon_mega_enabled <0/1>''' || Makes Gravity gun a super gravity gun.
|-
|-
| find || || Find substrings in console commands
| '''+playdemo <demo>''' || Immediately plays a demo file.
|-
|-
| force_install_dir || <directory> || Sets the directory to install the server in
| '''+ip''' || Specifies the IP when multiple network cards are installed (Old, but still works).
|-
|-
| get_download_throttle || ||
| '''+hostname "Hostname"''' || Specifies the name of the server (Spaces between words won't work here!).
|-
|-
| help || || Show help information
| '''+hostport <port>''' || Specifies the host port (Port specification before -port was added, but can still be used).
|-
|-
| info || || Dump various Steam info
| '''+clientport <port>''' || Specifies the client port (The port the server advertises to clients, the same as -port and clientport in console)
|-
|-
| install_folder_list || || List all mounted Steam volumes
| '''+sv_cheats <0/1>''' || When set to 1, starts the game with cheats enabled.
|-
|-
| licenses_for_app ||<appid> || Shows active licenses for appid
| '''+sv_lan <0/1>''' || When set to 1, launches the game in LAN mode. Useful to stop players from joining your game from the Internet.
|-
|-
| licenses_print || || Display users's Steam3 licenses
| '''+sv_use_steam_networking <0/1>''' || {{only|{{tf2branch}}}} When set to 0, disable Steam Networking. Useful to stop players from joining your game from the Internet.
|-
|-
| log_callbacks || <first callbackID> [last callbackID] ||
| '''+timedemo''' || Console Command
|-
|-
| log_ipc || [verbose] <filter> || Enables IPC logging. Specifying "counts" or "verbose" is optional, defaulting to counts.
| '''+timedemoquit''' || Console Command
|}
 
== Dedicated Server ==
 
Command-line arguments for the Source Dedicated Server executable (<code>srcds.exe</code>, <code>srcds_run</code>)
 
 
=== Command-Line Parameters ===
{| class="wikitable sortable"
! Argument !! Description
|-
|-
| login || <nowiki>[<password>|anonymous]</nowiki> [<Steam guard code>] || Login to Steam
| '''-allowdebug''' || (Same as -debug ?)
|-
|-
| logon || || See "login"
| '''-autoupdate''' || {{linux}} Autoupdate the game. Requires -steam_dir and -steamcmd_script to be set.
|-
|-
| logoff || || Disconnect from Steam
| '''-binary <binary>''' || {{linux}} Use the specified binary (no auto detection).
|-
|-
| logout || || See "logoff"
| '''-console''' || {{windows}} SrcDS will run in console mode.
|-
|-
| manifest_dump || <filename> ||
| '''-debug''' || Run debugging on failed servers if possible. Requires -gdb to be set {{confirm}}
|-
|-
| mem_stats || || Dump memory stats
| '''-debuglog <logname>''' || {{linux}} Log debug output to this file.
|-
|-
| net_msgdump || || Dumps list of sent net messages
| '''-dev''' || Show developer messages.
|-
|-
| net_msgspew || || Spews sent net messages
| '''-fork <number>''' {{l4d|since}} || {{linux}} Starts up the specified number of instances as subprocesses at once.  They will each use the first available port number at 27015 or above. When using this functionality, other server parameters support substitution. For instance, if you specify <code>+exec autoexec##.cfg</code>, then the first server will execute <code>autoexec01.cfg</code>, the second <code>autoexec02.cfg</code>, and so on.
|-
|-
| p2p_info || || Displays the current state of the P2P networking subsystem.
| '''-game <game or path>''' || Specifies which game/mod to run. Accepts either a path to a [[gameinfo.txt]], or [[Game Name Abbreviations|one of these pre-set values]].
|-
|-
| package_info_print || || Dumps package info for packageID
| '''-gdb <gdb>''' || {{linux}} Use <dbg> as the debugger of failed servers.
|-
|-
| quit || || Stops & close Steam client console
| '''-help''' || {{linux}} ?
|-
|-
| render_ipc_connections || ||
| '''-insecure''' || Starts the server without [[Valve Anti-Cheat]].
|-
|-
| run_app_build || [-preview] [-desc <text>] <appbuildfile> || Run app depot build as specified in appbuildfile
| '''-ignoresigint''' || {{linux}} Ignore signal INT (prevents CTRL+C quitting).
|-
|-
| run_app_build_http || || Alias for run_app_build
| '''-ip''' || Specifies the address to use for the bind(2) syscall, which controls on which IP addresses the program is reachable on. It must either be a local address (an addresses of the host it runs on) or 0.0.0.0 (the wildcard). This has nothing to do with externally-visible addresses in NAT setups.
|-
|-
| runscript || <script file, such as TXT> || Runs a console command script
| '''-maxplayers <number>''' || Specifies how many player slots the server can contain.
|-
|-
| set_download_throttle || <Kb/s> <bPersistent = false> ||
| '''-netconport <number>''' {{l4d|since}} || Creates a remotely accessible server console on the specified port.  This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
|-
|-
| set_spew || <group> <level> <logLevel> || Set spew levels for the given group
| '''-netconpassword <password>''' {{l4d|since}} || If set, users must type PASS "password" to use the remote console described above
|-
|-
| set_spew_level || <SpewLevel LogLevel> || Sets spew and log level for all groups
| '''-nobots''' || Disable bots.
|-
|-
| set_steam_guard_code || || Authorize this computer by adding the Steam Guard email code
| '''-nohltv''' || Disables [[SourceTV]] and closes its port (usually 27020).
|-
|-
| sign_install_script || <appid> <input filename> <output filename> || Upload install script to back end for signing
| '''-norestart''' || Won't attempt to restart failed servers.
|-
|-
| test_dropcon || || Tests dropping a connection
| '''-notrap''' || {{linux}} Don't use trap. This prevents automatic removal of old lock files.
|-
|-
| test_failnextconnect || || Tests failing the next connection
| '''-port''' || The port the server advertises to clients.
|-
|-
| upload_controller_config || <appid> <filename> || Upload controller config to cloud
| '''-steam''' || Use this (along with <code>-console</code>) when you are running the version of SRCDS downloaded through Steam{{confirm}}. Original Description "Quit on steam update failure"
|-
|-
| user_friends || || Dumps list of friends
| '''-steamcmd_script <path>''' || {{linux}}{{confirm}} Path to the steam script to execute. Example: ~/Steam/hl2_ds.txt.
|-
|-
| verify_chunk_store || <appid> <depotid> <datafile> || Run app depot build as specified in appbuildfile
| '''-steamerr''' || {{linux}} Quit on steam update failure.
|-
|-
| verify_vpk ||<datafile> || Verifies content of given VPK
| '''-steamuser''' || {{linux}} Steam user ID?
|-
|-
| voice_game_usage || || Displays information about the game's use of Steam voice
| '''-steampass''' || {{linux}} Steam Login Password?
|-
|-
| workshop_build_item || <build config filename> || Build a workshop item
| '''-steam_dir <path>''' || {{linux}} Dir that steam.sh resides in. Example: ~/Steam
|-
|-
| workshop_create_legacy_item || <appid> <workshop file> || Build a legacy workshop item
| '''-tickrate <number>''' || Specifies Server-Tickrate (for more info see [[Source Multiplayer Networking]]). This cannot be altered on {{tf2|1|nt=0}} (except older versions), {{css|1|nt=2}} (except older versions), {{l4d|1|nt=2}}, and {{l4d2|1|nt=1}}.
|-
|-
| workshop_download_item || <appid> <PublishedFileId> || Download a workshop item
| '''-timeout <number>''' || Sleep for <number> seconds before restarting a failed server.
|-
|-
| workshop_status || <appId> ||
| '''-dumplongticks''' || Generate minidumps when there are long server frame
|}
|}


=== ConVars ===
{{Source topicon}}  
* app_info_http_min = "0"          : 
* app_info_http_num_sockets = "8"          : 
* AsyncFileIODisableWrite = "0"          : 
* AsyncFileIOExpectOutstandingIO = "16"        : 
* AsyncFileIOForceGenericIO = "1"          : 
* AsyncFileIOMaxPending = "128"        : 
* AsyncFileIOReadHandleCache = "32"        : 
* AsyncFileIOWriteHandleCache = "32"        : 
* batterypercent = "0"          : 
* batterytime = "0"          : 
* bCheckForFreeGamesOnLogin = "0"          : 
* bCheckUGCIntegrity = "1"          : 
* @bContentManifestUseProtobufs = "1"          : 
* @bCSClientRateLimitUseDelays = "0"          : 
* @bCSForceNoCache = "0"          : 
* @bDepotBuilderReadBufferSizeKB = "8192"      : 
* @bDepotBuilderUnbufferedReads = "1"          : 
* bDisableTenFootOverlay = "0"          : 
* @bEnableMovieRecording = "0"          : 
* @bEnableOfflineLogonTicket = "1"          : If true, an offline logon ticket will be requested during logon if none is cached
* @bEnableSpewThrottle = "1"          : 
* bEnableSubscribedFileListCache = "1"          : 
* bFinishStagedDepotVersions = "1"          : 
* @bForceStreamUnsupportedApp = "0"          : 
* @bLANPeerConnectionTimeoutSec = "5"          : 
* bLogLegacyDiskDetails = "0"          : 
* @bMsgErrorDump = "0"          : 
* @bRequireOfflineLogonTicket = "0"          : If true, a valid offline logon ticket is required when logging in in offline or no connection mode
* @bRequireSignedParentalSettings = "1"          : If true, a valid set of signed parental settings is required when logging in in offline or no connection mode
* broadcast_upload_drop_sec = "6"          : 
* broadcast_upload_update_sec = "3"          : 
* bSteam3LimitedUserEnable = "1"          : 
* bSteamLoaderEnable = "1"          : 
* bSubscribedFilesDecompressOnClient = "1"          : 
* bSubscribedFilesPollForUpdates = "0"          : 
* bSubscribedFilesUseRangeRequests = "0"          : 
* bVerifyAllDownloads = "0"          : 
* cAppUpdateWorkingSetMB = "128"        : 
* @cbPartnerUploadChunkSize = "1000000"    : Chunk size to use for POSTing partner uploads
* @cCSClientMaxNumSocketsPerHost = "8"          : 
* @cDepotBuilderFileChunkingThreads = "4"          : 
* cFileValidationMaxLog = "100"        : 
* ClientStatsUploadRateSeconds = "10"        : 
* @cMaxContentServersToRequest = "20"        : 
* @cMaxInitialDownloadSources = "-1"        : 
* @cNetEncryptionHandshakeWorkMax_HighPri = "8000"      : 
* @cNetEncryptionHandshakeWorkMax_LowPri = "2000"      : 
* @cNetEncryptionHandshakeWorkMax_MedPri = "4000"      : 
* countrycode = ""          : 
* cPreallocateMinimumSizeKB = "256"        : 
* @csecCSRequestProcessorTimeOut = "300"        : 
* @csecFavoriteGameAccountCacheTime = "86400"      : Control how often we refresh the account IDs in the game server favorites list
* @csecIncomingDataRatePeriod = "1"          : 
* csecManifestDownloadTimeout = "120"        : 
* @csecUpdateTargetNumConnectionsEpoch = "10"        : 
* @cSecUploadDownloadRates = "300"        : 
* @CSInterfaceProxyPassword = ""          : 
* @CSInterfaceProxyUsername = ""          : 
* @cUDPSendRetries = "8"          : 
* @CustomBinaryRequestRetryTimes = "20"        : 
* @DepotBuilderAppInfoTimeout = "120"        : 
* @DepotBuilderConfigRoot = "./depotscripts" : 
* @DepotBuilderContentRoot = ""          : 
* @DepotBuilderMaxParallelUploadChunks = "24"        : 
* @DepotBuilderNoReslist = "0"          : 
* @DepotBuilderNumHTTPSocketsToMDS = "12"        : 
* @DepotBuilderOutputRoot = ""          : 
* @DepotBuilderParallelUploadChunks = "6"          : 
* @DepotBuilderProgressTimeout = "1000"      : 
* DepotDownloadProgressTimeout = "120"        : 
* DepotReconstructionLowPrio = "1"          : 
* DepotReconstructionNumIOThreads = "1"          : 
* DepotUseAlternatingReadWrite = "1"          : 
* developer = "0"          : 
* @EnableUDPHistory = "0"          : 
* @fDownloadRateImprovementToAddAnotherConnection = "1.2"        : 
* findbestcellstartupdelay = "600"        : 
* @fMinDataRateToAttemptTwoConnectionsMbps = "0.5"        : 
* @GCNameOverride = ""          : 
* @IOCPGetCompletionBatchSize = "1"          : 
* @LocalContentServer = ""          : 
* log_files_always_flush = "0"          : 
* log_matchmaking_callbacks = "0"          : 
* @MaxOutstandingSendThreadItem = "1000"      : 
* mic_autogain = "16000"      : automatic gain control level for microphone input
* mic_inputfile = ""          : causes voice data to be read from the specified file instead of from the microphone
* mic_outputfile = ""          : causes microphone data to be written out to the specified file
* musiclogging = "0"          : 
* nBroadcastSessionHearbeatSec = "120"        : 
* nBroadcastSessionMaxDropFrames = "100"        : 
* nClientBackgroundAutoUpdateTimeSpreadMinutes = "0"          : Number of minutes to spread background auto-updates out over
* nClientCMUDPPingTimeGoodEnoughThresholdMS = "50"        : 
* nClientCMUDPPingTimeoutUseGoodEnoughMS = "250"        : 
* nCloudDownloadMinIntervalSec = "60"        : 
* nCloudFileCompressionMinFileSizeKB = "16"        : 
* nCloudFileCompressionMinFileSizeKBSharedFile = "128"        : 
* nCloudFileCompressionPercentageMin = "10"        : 
* nCloudFileCompressionPercentageMinSharedFile = "50"        : 
* nCloudSyncIntervalSec = "30"        : 
* nCloudUploadMinIntervalSec = "1800"      : 
* nContentStatsReportInterval = "72"        : In Hours
* @nCSClientRateLimitKbps = "0"          : 
* @nDownloadLANChunkCacheSizeMB = "128"        : 
* @nDownloadLANPeerGroup = "0"          : 
* @net_backlog_bytes_allowed = "12000000"  : 
* @net_backlog_time_allowed_sec = "5"          : 
* @NetConnectionBufferMsgLimit = "1000"      : Max # of message that will be buffered into a single zipped packet
* @NetConnectionBufferThreaded = "1"          : 
* net_incomingcheck = "1"          : 
* @net_loopback = "1"          : 
* net_maxresendsperframe = "32"        : 
* @nLANPeerRateLimitKbps = "0"          : 
* @nNetConnectionBufferZipLevel = "1"          : 
* @NoPromptForPassword = "0"          : 
* @nParentalSettingsLogLevel = "4"          : Control the amount of spew written to the parental log file
* nProductInfoUpdateInterval = "900"        : 
* @nSpewThrottleNagFrequencyMs = "5000"      : 
* n@SpewThrottlePeriodMs = "1000"      : 
* @nSpewThrottleResumeThreshold = "3"          : 
* @nSpewThrottleTriggerThreshold = "10"        : 
* @nSpewThrottleUnconditionalResumeMs = "5000"      : 
* @nSpewThrottleUnconditionalTriggerCount = "50"        : 
* nSubscribedAutoDownloadMaxSimultaneous = "8"          : 
* @nTCPLargeSendBufSizeMB = "16"        : 
* p2p_connecttimeout = "15"        : 
* p2p_unusedtimeout = "120"        : 
* rtime32EarliestSubscribedFileToDownload = "1348857570" : 
* @sCSDSVirtualHostHeader = ""          : 
* ServerBrowserPingSurveySubmitPct = "5"          : 
* @ShutdownOnFailedCommand = "1"          : Exit steamcmd immediately upon any failed build-related command
* spew_controller_loss = "0"          : 
* @sSteamCmdForcePlatformBitness = ""          : Must be one of: [32 | 64]
* @sSteamCmdForcePlatformType = ""          : Must be one of: [windows | macos | linux]
* @strCSNoCacheHeader = "no-cache"  : 
* @StreamClientArgs = ""          : 
* testappcloudpaths = "0"          : 
* uForcePreloadApp = "0"          : 
* UGCCDNReportPct = "100"        : 
* voice_autogain = "0"          : 
* voice_minabs = "0.15"      : 
* voice_minavg = "1.0"        : 
* voice_outputdevice = "0"          : 0=>Miles 1=>XAudio2
* voice_outputfile = ""          : causes output from voice system to be written out to the specified file
* voice_preprocess = "1"          : enables voice cleanup on incoming microphone data
* voice_quality = "4"          : 
* workshop_items_cache_days = "14"        : 
* workshop_items_update_interval = "900"        :
=== Examples ===
* <code>steamcmd.exe +login <username> <password> +force_install_dir <path> +app_update <appid> -validate
 
== Source Dedicated Server ==
 
Command-line arguments for the Source Dedicated Server executable (<code>srcds.exe</code>, <code>srcds_run</code>)
 
=== Command-line parameters ===
 
; <code>-allowdebug</code>
: (Same as -debug ?)
; <code>-autoupdate</code>
: The server is searching for updates on startup (Linux/Unix only).
; <code>-console</code>
: SrcDS will run in console mode (Windows only).
; <code>-debug</code>
: Debug Mode.
; <code>-dev</code>
: Show developer messages.
; <code>-game <game or path></code>
: Specifies which game/mod to run. Accepts either a path to a [[gameinfo.txt]], or [[Game Name Abbreviations|one of these pre-set values]].
; <code>-insecure</code>
: Will start the server without [[Valve Anti-Cheat]].
; <code>-ip</code>
: Specifies the address to use for the bind(2) syscall, which controls on which IP addresses the program is reachable on. It must either be a local address (an addresses of the host it runs on) or 0.0.0.0 (the wildcard). This has nothing to do with externally-visible addresses in NAT setups.
; <code>-maxplayers <number></code>
: Specifies how many player slots the server can contain.
; <code>-nobots</code>
: Disable bots.
; <code>-nohltv</code>
: Disables [[SourceTV]] and closes its port (usually 27020).
; <code>-norestart</code>
: Won't attempt to restart failed servers.
; <code>-port</code>
: The port the server advertises to clients.
; <code>-steam</code>
: Use this (along with <code>-console</code>) when you are running the version of SRCDS downloaded through Steam.
; <code>-tickrate <number></code>
: Specifies Server-Tickrate (for more info see [[Source Multiplayer Networking]]). This doesn't exist on TF2, CSS, L4D, and L4D2.
; <code>-timeout <number></code>
: Sleep for <number> seconds before restarting a failed server.
; <code>-dumplongticks</code>
: Generate minidumps when there are long server frames
; <code>-usercon</code>
: Enables RCON for CS:GO Servers
 
=== Console variables ===
* '''+<console variable> <arg>''' - Sets the Cvar (or [[:Category:Console_Variables|console variable]]) to the specified setting.
 
==== Some useful console variables ====
* '''+hostname "Hostname"''' - Specifies the name of the server (Spaces between words won't work here!).
* '''+ip''' - Specifies the IP when multiple network cards are installed (Old, but still works).
* '''+map <map>''' - Specifies which map to start.
* '''+maxplayers <number>''' - Specifies how many player slots the server can contain (Old, but still works).
* '''+hostport <port>''' - Specifies the host port (Port specification before -port was added, but can still be used).
* '''+clientport <port>''' - Specifies the client port (The port the server advertises to clients, the same as -port and clientport in console)
* '''+sv_lan <0/1>''' - If set to 1, server is only available in Local Area Network (LAN).
 
=== Linux command options in Left 4 Dead (2) ===
The linux version of [[Left 4 Dead]] and [[Left 4 Dead 2]] dedicated server added extra server commands.
 
As part of the forking functionality mentioned below, the server parameters support substitution.  For instance, if you specify ''+exec autoexec##.cfg'', then the first server will execute ''autoexec01.cfg'', the second ''autoexec02.cfg'', and so on.
 
* '''-netconport <number>''' - Creates a remotely accessible server console on the specified port.  This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
* '''-netconpassword "password"''' - It set, users must type PASS "password" to use the remote console described above
* '''-fork <number>''' - Starts up the specified number of servers at once.  They will each use the first available port number at 27015 or above.
 
== Half-Life Dedicated Server ==
These command-line parameters are used with <code>hlds.exe</code> for [[Goldsource]] (Half-Life) games.
 
{{syntax|hlds.exe <parameter1> <parameter2> <cvar1> <cvar2>}}
 
=== Examples ===
* <code>hlds.exe -console -game cstrike +sv_lan 0 +maxplayers 22 +map de_dust2</code>
* <code>./hlds_run -game cstrike -autoupdate -pingboost 2 -port 27016 +maxplayers 20 +map de_dust2</code>
 
=== Command-line parameters ===
* '''-condebug''' - Stores console output to "Half-Life\qconsole.log".{{Note|Can be toggled with '''condebug''' console command.}}
* '''-dev''' - Enables developer mode.
* '''-autoupdate''' - The server is searching for updates on startup (no longer works?{{confirm}}).
* '''-console''' - HLDS will run in console mode (Windows only).
* '''-game [[Game Name Abbreviations|<game>]]''' - Specifies which game/mod to run. Default is "valve".
* '''-dll <name.dll>''' - Specifies which DLL to use. Ex: <code>-dll addons\metamod\dlls\metamod.dll</code>.
* '''-nomaster''' - Disable communication with Master server. Use this parameter if you do not want your server to be listed in Server Browser.{{Note|Also disables [[server queries]].}}
* '''-insecure''' - Disables Valve Anti-Cheat technology.
* '''-port <port>''' - Specifies which port to use for client connections. Default is 27015.{{Note|Can do the same with '''port''' console variable.}}
* '''-sport <port>''' - Specifies the VAC port the server should use. Default is 26900.{{Note|You only need to change -sport if VAC connections fail through the primary port.}}
* '''-noip''' - Disables network support.
* '''-noipx''' - Disables IPX support.
* '''-tos''' - Enables the LOWDELAY TOS header in the udp/ip packets the server generates. (Linux only)
* '''-nobreakpad''' - Let plugin authors still get old style minidumps if they need it (win32 only)
* '''-num_edicts <variable>''' - Sets the entity limit for map/game entities (not temporary entities, which is still locked to 500). 900 is default. 4096 is a good limit, beyond that seems to cause hunk_alloc errors{{confirm}}. Both clients and servers need matching values for best compatibility{{confirm}}.
* '''-heapsize <kilobytes>''' - Specifies the amount of heap(or free store - cache, an area of memory used for dynamic memory allocation) the engine will use. Minimum value is 14336(14 MB). Maximum value is 131072(128 MB). By default this is set to 40960 (40 MB) and automatically adjusted to suit your system.{{Note|Low value causes "Unable to allocate X.X MB" exit error.}}
* '''-zone <bytes>''' - Specifies the amount of Bytes of memory for use with the console system.{{Note|Low value causes [[Z_malloc|Z_Malloc]] exit error.}}
* '''-maxplayers <number>''' - Sets the maximum number of players that will be able to join your server.{{Note|Can do the same with '''maxplayers''' console variable.}}
* '''-sys_ticrate''' - Overrides sys_ticrate cvar.
* '''-exec <file>''' - Execute specific config file immediately after the engine is loaded.
* '''+<console variable> <arg>''' - Sets the Cvar (or [[console variable]]) to the specified setting.
 
=== Useful console variables ===
* '''+hostname "Server Name"''' - Specifies the name of the server.
* '''+ip <address>''' - Specifies the IP when multiple network cards are installed. Required for VAC2 operation.{{Note|Usually you do not need to specify this.}}
* '''+map <map>''' - Specifies which map to start with.
* '''+sv_lan <0/1>''' - If set to 1, server is only available in Local Area Network (LAN).
* '''+mapchangecfgfile <file>''' - Like Server.cfg, ran after every round change, before Plugins are started.
* '''-pingboost <1/2/3>''' - Selects between optimized HLDS network code stack. Set this on 2 usually reduces latency toward 1ms without loss of activity input packets.
 
== Troubleshooting the Server Console ==
Specifying a map is necessary, otherwise the server is not ready to accept connections from players to your server. You may wish to specify the "ip" and "port" parameters if you are experiencing problems.
{{note|This only applies to dedicated servers.}}
 
== See also ==
 
[[Developer Console]]
 
[[Category:Steam]]
[[Category:Source SDK FAQ]]
[[Category:Source SDK FAQ]]
[[Category:Dedicated Server]]
[[Category:Dedicated Server]]

Latest revision as of 04:09, 1 September 2025

English (en)日本語 (ja)Русский (ru)Translate (Translate)
edit
Example of Half-Life 2 launch options in Steam, with -dxlevel 95 -high applied.

Command line options (frequently command line arguments or command line parameters; launch options on Steam) are additional arguments specified before the program starts, these functionally change the behavior of the program in some way, such as launching the game and start the game with the specified map directly, or play a demo for example.

Command line arguments are traditionally prefixed with a hyphen (-), but some Windows Windows applications (especially system ones) will use a forward slash (/) instead. Quake Quake uses plus (+) as a prefix for console commands or cvars that will get executed by the game as soon as it starts, and all Valve engines inherit this syntax.

Engine

These command-line parameters will work with any Source engine games (Half-Life 2 Half-Life 2, Counter-Strike: Source Counter-Strike: Source, etc.).

Syntax: hl2.exe <parameter1> <parameter2> <cvar1> <cvar2>

Usage

These options can be used with:

  • Hammer editor Run Map dialog.
  • Windows shortcuts pointing to hl2.exe directly.
  • Windows shortcuts pointing to steam.exe with the proper -applaunch <AppID> specified (see Steam section below).
  • Launch options on the game's properties in Steam library.
  • Command-line batch script files launching these applications. For example: A bat file containing only "left4dead2.exe -dev -tools -nop4" to launch Left 4 Dead 2 Left 4 Dead 2 in tools mode.
  • Linux shell scripts pointing to the application with launch options. executable -command

Examples

  • steam.exe -applaunch 240 -dev -console -sw +sv_lan 1 +map MyMap
  • hl2.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust
    • Same as above but launched from the game executable directly, with the map de_dust. Note that latest version of Counter-Strike: Source and other games on Team Fortress 2 branch has it's own executable name based on the game's moddir (cstrike, dod, etc.), like cstrike.exe for Counter-Strike: Source, dod.exe for Day of Defeat: Source, hl2mp.exe for Half-Life 2: Deathmatch, and so on. The -game cstrike command line parameter are also no longer required to be used for those games, as in the case of Counter-Strike: Source, boots directly to Counter-Strike: Source instead of Half-Life 2 (which will always crash with a message "Could not load library client").
  • hl2_win64.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust
    • Same as above, but with 64-bit executable.

Command-Line Parameters

Argument Description
-adapter Sets the GL graphics adapter. Default is 0.
-all_languages Loads all language files.
-allowdebug Allows for debug modules to be loaded in games that disable them and fakes a debugger for phonehome, and is the same as -dev, unless -nodev is specified.
-allowmultiple (in all games since Portal 2) Allows multiple Source games to run at the same time. Only works if a VPROJECT environment variable is set. Use -multirun instead for Source 2013 Source 2013.
Note.pngNote:Source games that do not support this (or -multirun) can be run at the same time as a game that does, as long as the other game that doesn't support it was started first.
Note.pngNote:In Strata Source Strata Source, both -allowmultiple and -multirun are supported, VPROJECT is not required, and using either will disable creating the Source mutex entirely, so any other game can still be started at the same time.
Confirm:Does this work on Mac/Linux?
-allowstalezip Suppresses console warnings from stale.txt existing.
-allow_third_party_software (only in Counter-Strike: Global Offensive) Previously -untrusted, this launches the game in "Untrusted Mode", which allow third-party programs to injecting its code into game executable.
-anticheat_settings (only in Apex Legends) This command are most likely used to change Epic Games Launcher/Easy Anti-Cheat settings for the game. It was also used to enable Direct3D 12 (DX12), using -anticheat_settings=SettingsDX12.json. Previously -eac_launcher_settings.
-audiolanguage (only in Team Fortress 2) Changes the audio (spoken) language. Due to the way it works, only -audiolanguage english works. However, it is possible to make other languages to work.
-autoconfig Restores video and performance settings to default for the current hardware detected. Ignores settings inside any .cfg files until this parameter is removed.
-background <n> (only in Left 4 Dead 2Portal 2) Forces the main menu background ID to the integer n for the current session.
-basedir Sets the base directory for the game files. On Xbox 360 RFS, this is forced to smb://hostname/game.
-bi Defines the build identifier ID which is used in phonehome
-bugbait Used internally to tell the game it is loading a Bugbait (the name of the bug reporting system) bug report.
-bugreporterdll Name of the bug reporter DLL to use
-buildcubemaps Builds cubemaps when fully loaded into a map, then quits the game.
-ccsyntax Spew details about the localized strings we load.
-clientport Sets the client port. Default is 27002.
-collate Skips everything, just merges the reslist from temp folders to the final folder again.
-conclearlog Clears the console.log text file on start. Only works if -condebug set.
-condebug Logs all console output into the console.log text file.
-console Starts the game with the developer console enabled, and allows it to be opened even if con_enable is set to 0. Disables the automatic loading of menu background maps, except in Half-Life 2 and Portal - use -nobackground if you want this.
-deathsonly Supposed to only count deaths while parsing tf2 gamestats, but actually pointless because there is only code for deaths.
-debugdxsupport Writes debug DirectX information as keyvalues to the console as shader devices are loading configuration.
-debugsteam2wrapper (only in Source SDK Base 2006Source SDK Base 2007) Writes debug information for files accessed through the Steam 2 Wrapper to the debugger. Includes creation and deletion of file handles. See Fixing VPK mounting for older Source SDK Bases for more information.
-defaultgamedir Fallback directory if "-game" is not set. Default is "hl2".
-demo Enters the game into demo mode. Only works for Half-Life 2 and Portal
-dev Enables the developer ConVar, which prints console output to the top-left of the screen and enables extra debug messages. Also has various other effects depending on the engine branch and game.

Disables the automatic loading of menu background maps, except in Half-Life 2, Portal (use -nobackground), and Postal III (use -nostartupmenu).

-disable_d3d9ex (only in Counter-Strike: Global Offensive) Forcefully disables Direct3D 9Ex.
-disallowhwmorph Same as mat_disablehwmorph 1. Disables HW morphing for particular mods.
-dti Prints the datatable when being sent
-dumpvidmemstats Spews video memory statistics to vidmemstats.txt. This forces CModelLoader to quit.
-dvd Xbox 360 Enables strict DVD mode. Allows loading files from DVD only. Xbox 360 only.
-dvddev Xbox 360 Enables developer DVD mode. Allows loading files from a remote path as a fallback as well as the DVD. Xbox 360 only.
-dx9 (only in Half-Life 2Half-Life: SourceLeft 4 Dead 2PortalPortal 2Team Fortress 2 branch) Windows Forces the game to never use DXVK, even in cases where it would be automatically enabled (such as when -gamepadui is passed in).
Note.pngNote:To force OpenGL (using ToGL) on Linux, use -gl instead.
-dxlevel <level> (removed since Left 4 Dead) Forces the game to start using specified DirectX feature levels. After starting the game with this launch parameter, the selected value will be saved for future start ups and video settings will be temporarily reset (but not saved), so it is highly recommended to remove this launch parameter after first launch with it. See mat_dxlevel.
Please note that changing DirectX levels does not change the Direct3D renderer to use any other versions of Direct3D. All Source games will always run on Direct3D 9 (or Direct3D 11/12 in some third-party games).
Supported values:
60 (DX6, Source 2004/2006 only)
70 (DX7, Source 2004/2006 or RTX Remix games only)
80 (DX8)
81 (DX8.1)
90 (DX9.0 / SM 2.0)
92 (equivalent to both "90" and "95". Mac/Linux only, translates DirectX to OpenGL using ToGL). Has partial SM 3.0 support.
95 (DX9.0+ / SM 3.0, default on modern hardware)
98 (Xbox 360 only, always enabled)
100 (Left 4 Dead engine branch Left 4 Dead engine branch, Source Filmmaker SFM and Dota 2 Dota 2 pre-Reborn only, always enabled)
Warning.pngWarning:If you are using Vulkan renderer (-vulkan), having dxlevel set lower than 90 (such as 80/81) will cause graphical glitches and crashes the game.
Similarly, playing on maps that ship with custom models/props which only support dxlevel 90 or higher can cause the game to crash on dxlevel 81 or lower.
-edit According to comments, intended to replace -tools. Does nothing except disable all file logging for building reslists.
-enablefakeip (only in Team Fortress 2) Tells Steam Datagram Relay to use a "FakeIP" and an anonymous server ID when local server hosting.
-endgamevid If specified startup videos will not be skipped, and EndGameVids.txt will be used instead of StartupVids.txt. This can also be invoked by the command "startupmenu playendgamevid", which bails back to the menu and plays the end game video.
-exit Quits the game after fully loading into a map.
-fake_stale_server Counter-Strike: Global Offensive Skip check game version from Steam and goes straight to out-of-date state
-force32bit (only in Team Fortress 2 branch) Forces the game to run in 32-bit mode, even if running on a 64-bit operating system.
Note.pngNote: Windows: Create new shortcut from 32-bit executable program and add in launch parameter -force32bit, launch game from shortcut.
-force64bit (only in Team Fortress 2 branch) Forces the game to run in 64-bit mode.
-filmgrain Enables the filmgrain screen space effect. Crashes the game on Half-Life 2. In Day of Defeat: Source effect works and enabled by default
-floathdr Forces HDR to use float values.
-flushlog Causes log files to be flushed to disk once per second (rather than after every 4kbytes of log data).
-forceallmips Always load mipmaps below 32x32, regardless of if the "no minimum mipmap" VTF flag is enabled.
-forcenovsync Forces vsync to be disabled.
-forcestartupmenu Forces the background menu map to always load, even if developer mode is active or the game is loading straight to a level.
-forcexboxreconfig Xbox 360 Forces default config settings to be loaded on Xbox 360.
-force_device_id (in all games since Counter-Strike: Global Offensive) (also in Source 2013) Forces the GPU to be recognized as a different graphics card depending on the vendor set. This is used for either debugging purposes or for graphical workarounds, such as avoiding an Intel crash in L4D2 when both Shaders and Memory Pool are set to high, aswell as forcing the "High" shadows setting to be shown on systems with Intel GPUs.
Tip.pngTip:-force_vendor_id 0x10DE -force_device_id 0x0191 will force the game to recognizing the GPU as a Nvidia GeForce GTX 1080 Ti (most Source games will detect this as "NVIDIA Unknown" according to dxsupport.cfg).
And -force_vendor_id 0x10DE -force_device_id 0x1088 will force the game to be recognized as GeForce GTX 590, which was listed in dxsupport.cfg (in most Source games, some may only recognizes older GPUs), and set most of the graphical settings to high by default.
-force_vendor_id
-forever When you get to the end of the maplist, start over from the top
-freq <rate> Same as -refresh
-fs_log Starts creating a batch file to copy files at the specified filename. This works on the latest engine branch.
-fs_logbins Logs binaries to the batch file from -fs_log.
-fs_nopreloaddata Loads in the precompiled keyvalues data for each type. Works only with dedicated servers.
-fs_target Sets the target game directory to copy files to, used with -fs_log.
-full_memory_dumps
-fullscreen or -full Forces the engine to start in fullscreen mode.
-g15 Enables Logitech G15 support. G15 is only supported in SiN Episodes SiN Episodes. [confirm]
Confirm:Does this also works with other Logitech G series keyboards with LCD screens, such as G19?
-game Sets game or mod directory to load the game from. Usually is set by default if not user specified. Default is "-defaultgamedir"'s setting. If -defaultgamedir is not set, "hl2" is used.
-gamepadui Half-Life 2Half-Life: SourcePortalEntropy : Zero 2 Enables the alternate controller-friendly UI used on Steam Deck, and since Half-Life 2 20th Anniversary Update (and Portal May 2025 update), makes VGUI elements larger.
Left 4 Dead 2Portal 2Team Fortress 2 branch Makes various UI elements larger. In Team Fortress 2 branch, also makes VGUI elements bigger.
When used, keyvalues in VGUI resource files tagged with $DECK will evaluate as true. This is used by default on Steam Deck Steam Deck and in Entropy : Zero 2 Entropy : Zero 2; use -nogamepadui if the original UI is desired.
This also automatically enables DXVK (except Half-Life 2 and Half-Life: Source since 20th anniversary, and Portal since May 2025 update); use -dx9 to prevent this. Only present with updates released since 2020 - 2022 in any of those games.
Note.pngNote:On Portal with RTX Portal with RTX, to enable Gamepad UI, you must use -dx9 alongside it, otherwise it would break the renderer.
Icon-Bug.pngBug:Gamepad UI is also available on Half-Life: Source Half-Life: Source due to shared binaries with Half-Life 2 Half-Life 2, but is broken.  [todo tested in ?]
-gamestatslogging Enables game stats logging.
-gamestatsloggingtofile Enables game stats logging out to a file, gamestats.log. Passing this parameter automatically forces -gamestatslogging.
-gamestatstag <tag> Tags each map reported with the specified tag.
-gl (only in Team Fortress 2 branch) Linux Forces the game to runs on OpenGL instead of Vulkan (through DXVK). You can also select "Legacy OpenGL" option when launching the game on Steam (if available), to force OpenGL.
-gl_enablesamplerobjects Linux Use OpenGL Sampler Objects for better texture preloading
-gl_texclientstorage macOS Reduce memory usage by relying on GPU memory instead of a host copy
-heapcheck Windows Check if the heap isn't damaged or empty at the initiation of the game and every frame
-heapsize <kilobytes> Specifies the heapsize (in kilobyte) the game will use.
This has been since deprecated on later version of Source 2009 Source 2009 and Source Multiplayer Source Multiplayer, but can still be changed through console commands (mem_min_heapsize and mem_max_heapsize)
-height <height>, -h Forces the engine to start with resolution set to <height>. Ex: -h 768
-hideconsole Forces the console hidden, whatever parameters are passed. This overrides -console, -dev, and all others.
-high Sets the game's priority to High.
Icon-Bug.pngBug:In Apex Legends Apex Legends, this may cause the game into thinking that there is a Origin update available. A screenshot of this issue can be found here.  [todo tested in ?]
-hijack Take control of an existing instance of the game, if any, instead of complaining about already running.
-host Sets hostname. On Xbox 360, this sets the host computer name to be used for RFS. Xbox name must be <HostPC>_360.
-hushasserts Disables a number of asserts in core Source libraries, skipping some error checks and messages.
-hushsteam
-ignoredxsupportcfg Skips reading DirectX support file, dxsupport.cfg.
-insecure Disable Valve Anti-Cheat (VAC).
-internalbuild Causes the bug reporter panel to be drawn as internal
-interactivecaster (only in Counter-Strike: Global Offensive) Starting your client with this will switch it into camera man mode (reference tv_allow_camera_man_steamid/tv_allow_camera_man_steamid2)
-ip Does the same as the ipname Cvar
-language <language> Sets the game language to the one specified. (Examples: "english", "german").
-leakcheck Dumps statistics about memory leaks.
-limitvsconst Limits the number of vertex shaders to a maximum of 256.
-localcser Sets a custom gamestats CSER other than the Steam-provided public one (default is steambeta1:27013)
-log_opened_files Logs all opened files to opened_files.txt file. (useful for debugging which files are failing to load)
-low Sets the game's priority to Low
-lv Short for low violence. Enables German censorship like -sillygibs in Team Fortress 2 Team Fortress 2 with blood/gore disabled.
-makedevshots Used for taking screenshots, causing entities to not fade. Enables the use of the devshots_nextmap concommand. Also disables the automatic loading of menu background maps.
-makereslists Makes reslists. Need to run with -textmode. Passing a parameter here uses a script file to control more complex makereslists operations (multiple passes, etc.)
-mat_softwaretl Enables software vertex processing.
-mat_vsync Enables Vertical Sync
-maxdownloadfilesizemb CS:GO 5/1/2014, client launch option -maxdownloadfilesizemb N if clients needs to download even larger files from community servers.
-maxdxlevel Limits the maximum dxlevel to use. Default is 0.
-maxplayers Set the maximum players allowed to join the server. This does the same as the maxplayers convar, the maximum you can set it to is limited by the game/mod.
Note.pngNote:In Counter-Strike: Global Offensive Counter-Strike: Global Offensive, Maxplayers is deprecated, and should either be set in gamemodes_server.txt or with -maxplayers_override.
-minmemory Set startup memory to mem_min_heapsize ?*1024 * 1024?
-monitorTextureSize Set the size of the texture used to render point_cameras.
-multirun (only in Source 2013)(also in Strata Source) Allows the game to run even if another Source game is already open.
Note.pngNote:Source games that do not support this (or -allowmultiple) can be run at the same time as a game that does, as long as the other game is started first.
Note.pngNote:In Strata Source Strata Source, both -allowmultiple and -multirun are supported, and using either will disable creating the Source mutex entirely, so any other game can still be started at the same time.
Note.pngNote:Not supported in Source Filmmaker SFM. Multirun is still possible by starting other games first as explained above.
Icon-Bug.pngBug:On some systems, running the game after another Source game is already open, cause the menu logo and/or menu options to become invisible  (tested in: Counter-Strike: Source Counter-Strike: Source and Half-Life 2 Half-Life 2)
Note.pngNote:Windows only. Does not work on Linux. Mac untested.
-navanalyze Used for developer purposes when launching a map. Immediately analyzes the navigation map of the loaded map to provide data about hiding spots and other data. Nav Mesh Commands
-navforceanalyze Used for developer purposes when launching a map. Forces an immediate navigation analyze even if the action is not necessary to perform.
-netconport <number> (in all games since Left 4 Dead) Creates a remotely accessible server console on the specified port. This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
-netconpassword <password> (in all games since Left 4 Dead) If set, users must type PASS "password" to use the remote console described above
-netspike Sets the trace threshold to the specified value (the limit of the number of records that will be written to netspike.txt before all records are removed).
-newdialogs Forces new Steam dialog to be used.
-no_texture_stream (only in Team Fortress 2)[confirm] Disables the use of lower quality textures while higher quality versions load, favoring immediate loading of higher quality textures. Disabling texture streaming can improve performance on systems with GPUs that have low VRAM. Can be found on Ultra high settings on the Official Team Fortress Wiki or a wiki dedicated to TF2 command line options.
-no_compressed_verts Disables vertex compression for shaders.
-no_compressed_vvds Enables thin VVD data, even if the client is not an Xbox 360.
-noassert Allows attaching to a debugger instead of directly asserting.
-noasync Disables asynchronous filesystem access.
-nobackground (only in Half-Life 2Portal) Prevents background maps from loading, displaying only static background images instead.
Note.pngNote:Added in the HL2 Anniversary Update (and corresponding Portal update). Prior to this, -dev and -console would automatically disable background maps.
-noborder When used with the game set to windowed mode, will make the game act as if in fullscreen mode (no window border), commonly refers to Borderless Windowed mode.
This will allows you to switching between application and the game (Alt+Tabbing) without a 2-3 seconds delay. It is only supported in Source 2007 Source 2007 and above, and can be changed in menu starting with Left 4 Dead engine branch Left 4 Dead engine branch, later available in Garry's Mod Garry's Mod, some Source 2013 Source 2013 games (such as Half-Life 2 Half-Life 2 with Steam Deck update) and some third-party Source games.
For games that does not support borderless windowed mode, you can use third-party software such as Borderless Gaming, or Pcgw icon.png other listed here at PCGW.
-nobots Allows Counter-Strike server hosts to force bots disabled to enforce CPU limits.
-nobreakpad Disable the Breakpad crash handler.
-noclearsave Skips clearing the save directory after restoring a save.
-noconvert Xbox 360 "No conversions during retail"
-nocrashdialog Stop some windows crash message boxes from showing up.
-nod3d9ex (only in Source Multiplayer Source 2013) (also in Team Fortress 2 branch) Forcefully disables Direct3D 9Ex.
-nodefaultmap (Linux only[confirm]) Supresses the addition of -map
-nodev Disables -dev and -allowdebug during startup so sv_cheats and developer mode dosent get set.
-nodns Disable DNS requests and resolving DNS adresses.
-nodttest Skips datatable testing.
-noff Disables force feedback for controllers.
-noforcemaccel Use the Windows mouse acceleration settings. Only works if -useforcedmparms is set.
-noforcemspd Use the Windows mouse speed settings. Only works if -useforcedmparms is set.
-nogamedll Do not load the Game DLL, this most likely will cause your game/server to crash
-nogamepadui Overrides -gamepadui, forcibly disabling its effects when they would otherwise be automatically turned on (such as on Steam Deck or in Entropy : Zero 2 Entropy : Zero 2).
-nogamestats
-nohltv Disable SourceTV
-noip Do not bind to an ip and disables all multiplayer support
-nojoy (not in Left 4 Dead 2) Disables joystick support.
-nomaster Hides server from master serverlist.
-nomenuvid (only in Left 4 DeadLeft 4 Dead 2Portal 2) Disables main menu background videos. In the Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series, it will render the game startup image instead. In Portal 2 Portal 2, it will render a static image corresponding to the video that would have been used.
-nomessagebox Stop various windows error message boxes from showing up
-nominidumps Dont write minidumps
-nomouse Disables in-game mouse support.
-NoLoadPluginsForClient
-nop4 Forces the Engine to bypass Perforce Integration
-nophysx (only in Postal III) Completely disable NVIDIA PhysX physics engine, used for cloth simulation on Postal Dude's coat, but also prevent p3_prop_cloth entities (which uses PhysX) from displaying.
-nopreload Forces models to not be preloaded. Takes priority over cl_forcepreload and -preload.
-nopreloadmodels Same as -nopreload
-nops2b Disables Pixel Shader 2b support.
-noqueuedload Disables queued loading of map resources.
-NoQueuedPacketThread Linux No queued packet thread will be created.
-norebuildaudio Opposite of and overrides -rebuildaudio for the map reslist generator.
-norfs Xbox 360 Forces Remote Filesystem disabled. Xbox 360 only.
-norussian (only in Postal III) Preventing the game from switching to Russian language (Russian retail copies only).
-noshaderapi Loads a non-existent shader API dll, shaderapiempty.dll. Effectively disables shader and texture loading completely. May be useful with -textmode to load the game quickly since a GUI is not required.
-nosound Disables sound support
Warning.pngWarning:Source 2013causes crash of the game on startup
-nosrgb Disables support for SRGB.
-nostartupmenu (only in Postal III) Prevent the game from loading the main menu map if used alongside -dev.
-nostartupsound Disables menu music (sound/ui/gamestartup*.mp3) to play on startup.
-nosteamcontroller Disables Steam controller system
Note.pngNote:This does not disable Steam Input whatsoever.
-nouserclip Uses software clipping instead of hardware user clip planes
-novid When loading a game with this parameter, the intro video will not play.
-NoVConfig Prevents the filesystem you nexem library from running VConfig if it encounters a filesystem error where it cannot find the game content.
Todo: Fix grammar.
-olddialogs Forces old Windows dialogs instead of new Steam ones.
Todo: Does it do anything nowadays?
-override_vpk Forces actual files to override VPK.
-particles Sets the number of beam trails to allow (2048 by default, minimum is 512).
-phonehome If debug mode is also enabled, forces the init of phonehome? which handles some build information and sends them via netmessages to steam?
-pidfile <pidfile> Use the specified <pidfile> to store the server pid. Default is srcds.pid[confirm] (Unix/Linux only).
-pixel_offset_x Sets the pixel offset to translate on the X axis in MatSystemSurface.
-pixel_offset_y Sets the pixel offset to translate on the Y axis in MatSystemSurface.
-playtest Tells the engine to record the names of all sounds played via S_StartSound call without any of the sound flags SND_CHANGE_PITCH, SND_CHANGE_VOL, and SND_STOP.
Note.pngNote:You may dump this list of sounds using ConCommand snd_dump_filepaths.
Icon-Bug.pngBug:In Left 4 Dead 2 Left 4 Dead 2, ConCommand snd_dump_filepaths will ignore ConVar snd_store_filepaths and attempt to write to an inaccessible hard-coded path.  [todo tested in ?]
-pme Activate the performance monitoring events code, this again only works on Intel processors newer then PENTIUM4
-port <variable> Sets port for a listen server. Default is 27015.
-preload Does the same as the sv_forcepreload Cvar. If -nopreload or -nopreloadmodels, this behaviour is disabled
-primarysound If surround sound isn't enabled, forces the use of the primary sound buffer
-profile If using Xbox360 or enabling this, additional debugging information are logged like the map startup time and similar
-publicbuild Is this build a public one? If not, phonehome will not post information of this build to steam
-r_emulate_gl Emulates OpenGL on Windows, provides a framerate boost for most GPUs
Confirm:Doesn't seems to work at all. RTSS and other overlays applications still report it as DirectX 9.
-random_invariant Forces the game's random number generator value to be invariant.
-rebuildaudio Forces rebuild of _other_rebuild.cache (metacache) file at exit for the map reslist generator.
-recapvid RecapVids.txt will be used instead of EndGameVids.txt. This can also be invoked by the command "startupmenu playrecapvid", which bails to the mainmenu and plays the recap video.
-ref Sets MATERIAL_INIT_REFERENCE_RASTERIZER on the shader material adapter.
-reflectionTextureSize Set the size of the texture used to render the Water shader's real-time reflection and refraction.
-refresh <rate> Force a specific refresh rate. Ex: -refresh 60
-refreshrate <rate> Same as -refresh
-remote Sets the remote file path to be used with -dvddev.
-replay Increases maxplayers by 1 at startup and automatically executes replay.cfg for the server.
-requirecubemaps If a map dosen't have cubemaps, the game will promt up with "Map X does not have cubemaps!"
-resizing Allows resizing the window lower than a specific resolution.
-reslistdir Default is "reslists", use this to override. Reslist generator only.
-reuse Reuse network sockets
-rpt Remote perf testing. Same as having -condebug, -conclearlog, and -console enabled
-ru (only in Postal III) Set the game language to Russian.
-safe Enables video safe mode, which sets the game to windowed, the width to 640, the height to 480, refresh rate to default, and disables antialiasing.
-shader Loads a specific shader library instead of depending on hardware. Debug only.
-shaderdll Loads a different shader dll. Default is shaderapidx9.dll.
Todo: Is this the same as -shader?
-shadersondemand Creates shaders on access, helps reduce D3D memory for tools, but causes I/O hitches.
-sillygibs (only in Team Fortress 2) Forces gibs to be spawned as random common objects.
-skiploadingworkshopaddons (only in Alien Swarm: Reactive Drop) Only load addons from the addons folder, not subscriptions on the Steam Workshop.
-small Allow window sizing smaller than 640x480
-sndcachedebug Prints sound cache debug messages (developer must be enabled to see)
-snoforceformat Skips sound buffer creation
-soft Enables Software hardware rendering mode.
-softparticlesdefaultoff Sets particles to be rendered without feathering (scene depth blending) by default.
-softparticlesdefaulton Opposite of -softparticlesdefaultoff.
-spewsentences Spew out vox sentence names during reslist generation
-startmap Restarts devshot generation at the specified map if resuming from a crash.
-startstage When running from script file, this starts at specified stage, and sets current work item (default is 0). Reslist generator only.
-startwindowed, -windowed, -window, -sw Forces the engine to start in Windowed mode.
-steam Enables Steam support (if the game is launched from Steam, this is enabled by default). Working directory must be Steam directory. Works only for singleplayer games.
-steamlocal Similar to -steam. Runs Steam in local filesystem mode (all content off HDD), as opposed to remote filesystem mode (requiring Steam backend).
-steamport Master server updater port. Steam authentication port is this port + 1. (default is 26900)
-strictportbind If you launch the game with this option it will quit with an error message if it can't bind to the default or specified port.
-sv_benchmark Enables benchmarking through sv_benchmark_force_start.
-swapcores Swaps threads for the particle and material systems each init
-tempcontent Searches for game content in a folder called "_tempcontent" relative to the absolute game path. This option is enabled by default for Portal 1
-testscript <filename> Loads a .vtest file.
-testshaders Loads the shader_test library. Debug only.
-testsub
-textmessagedebug Spews client text messages to console.
-textmode Runs the game without graphics, and instead launches a command prompt that displays the Developer Console outputs. Additionally, if the game is already running, launching the game with this command will simply boot the game up, instead of displaying the message "Only one instance of the game can be running at one time." (like -allowmultiple or -multirun).
-threads Number of threads to allocate for the thread pool, default is 3
-tickrate Sets the game tick interval. Disabled in code for Team Fortress 2 Team Fortress 2 because "server ops are abusing it". Also disabled in Counter-Strike: Source Counter-Strike: Source, Day of Defeat: Source Day of Defeat: Source, Left 4 Dead Left 4 Dead and Left 4 Dead 2 Left 4 Dead 2.
In older versions on some of those games, or using server plugins, or by enabling it in the code, it can be changed.
-timedemoloop
-toconsole Starts the engine directly in the console, unless a map is specified with +map.
-tools Enables engine tools.
-trackdeletions Logs what files are marked for deletion in Reslist Generator.
-tvmasteronly Only one person allowed in HLTV.
-unrestricted_maxplayers (only in Team Fortress 2) Set the maximum players allowed to join the server. Unlike -maxplayers, this can allow for up to 100 players in a single server.
Warning.pngWarning:This feature is unsupported and not recommended, causing stability issues at maximum players.
-usedevshotsfile Get map list from specified file, default is to build for maps/*.bsp
-useforcedmparms Allows the use of -noforcemspd and -noforcemaccel.
-usegh Loads ghostinj.dll to allow support for third party dlls (gamehost)
-uselogdir Logs various data to logs/(mapname)/*
-usercon Enable RCON for Counter-Strike: Global Offensive servers
-usereslistfile Get map list from specified file, default is to build for maps/*.bsp. Reslist generator only.
-usetcp Disable TCP support
-vcrplayback Plays back a VCR recording. Nothing is simulated on the server, but all server packets are recorded. Note: VCR recording and playback only fully working on a leaked HLS build, other games and versions crash
-vcrrecord Records a client's game and allows you to play it back and reproduce it exactly. Requires -nosound See this video on how it is different.
-vguifocus Enables debug VGUI messages related to input focus.
-vguimessages Enables debug VGUI messages.
-vproject Manually sets the VProject directory to load game content for tools.
-vulkan (only in Half-Life 2Half-Life 2: DeathmatchHalf-Life: SourceHalf-Life Deathmatch: SourceCounter-Strike: SourceDay of Defeat: SourceLeft 4 Dead 2PortalPortal 2Team Fortress 2) Enables the use of the DXVK library to translate Direct3D graphics calls to the Vulkan API. On Windows, where Direct3D itself is supported, this is of little use and should usually not be enabled (except in Portal 2, where it can be used to work around some specific rendering bugs). On Linux, it is usually recommended for games which support it, due to providing better performance and less graphical issues compared to the OpenGL translation layer usually used on this platform.
A newer version of the respective games from 2021-2025 or later, and a graphics card that supports Vulkan (such as Nvidia GeForce 600-series/Kepler-based, AMD GCN 1.0 (or later) and Intel Skylake) are required in order to enable DXVK.
Warning.pngWarning:Enabling DXVK may crash the game if a third-party program tries to hook its overlay to the game unsuccessfully, and/or your GPU does not support Vulkan.
-vxconsole Xbox 360 Waits for Valve Xbox console to initialise. Xbox 360 only.
-wavonly Disables DirectSound and makes the engine attempt to play all sounds in PCM format.
-x <x position> In borderless windowed mode, determines where the window should be horizontally. Ex: -x 0. Note: Setting this to 0 will make it align with the left side of your main monitor, rather than its center. Negative values also aren't accepted.
-xnet_bypass_security Xbox 360 Disables Xbox 360 secure networking, to allow cross-platform testing.
-y <y position> In borderless windowed mode, determines where the window should be vertically. Ex: -y 0. Note: Setting this to 0 will make it align with the top side of your main monitor, rather than its center. Negative values also aren't accepted.
-width <width>, -w Forces the engine to start with resolution set to <width>. Ex: -w 1024

Deprecated Command-Line Parameters

Argument Description
-lowmemworkshop (only in Counter-Strike: Global Offensive) Allow updating very large map files on Steam Workshop. While the option still works, Valve most likely no longer allow users to upload CS:GO items to Workshop in favor of CS2.
-mat_aaquality Set CSAA quality level, does the same as the Convar mat_aaquality. This no longer works on most modern GPUs (starting with NVIDIA GeForce 750Ti/800M/900 series).
Confirm:Does not work on latest version/Source 2013 as the console command with the same name remains unchanged. Confirm whether this does anything on older engine.
-mat_antialias Antialiasing. Can be set to 8, amount past 8 won't sharpen the edges of game world.
Confirm:Also does not work on latest version/Source 2013. Confirm whether this does anything on older engine.

Console commands on startup

  • +<console command> <arg> - Runs command in console shortly after autoexec.cfg is executed. These are run by ConCommand stuffcmds issued from valve.rc.

Useful console commands

Console commands Description
+cl_showfps <0/1/2/3> When set to 2, shows the framerate and map name.
+connect Immediately connects to a server address.
+load <save name> Immediately loads the save specified after the engine starts.
+map <map name[.bsp]> Immediately loads the map specified after the engine starts.
+map_background <map name[.bsp]> Forces a specified background map to be used. Useful for testing custom background maps. To avoid loading standard background maps for speed reasons, use the -dev command-line parameter.
+mat_hdr_level Sets HDR level (off, LDR/SDR with Bloom, and HDR) before the background map loads. See HDR Lighting Basics.
+maxplayers <number> Sets maxplayers. This will set maxplayers before the background map loads. To change when running, run <disconnect> to escape the current map, including background maps.
+physcannon_mega_enabled <0/1> Makes Gravity gun a super gravity gun.
+playdemo <demo> Immediately plays a demo file.
+ip Specifies the IP when multiple network cards are installed (Old, but still works).
+hostname "Hostname" Specifies the name of the server (Spaces between words won't work here!).
+hostport <port> Specifies the host port (Port specification before -port was added, but can still be used).
+clientport <port> Specifies the client port (The port the server advertises to clients, the same as -port and clientport in console)
+sv_cheats <0/1> When set to 1, starts the game with cheats enabled.
+sv_lan <0/1> When set to 1, launches the game in LAN mode. Useful to stop players from joining your game from the Internet.
+sv_use_steam_networking <0/1> (only in Team Fortress 2 branch) When set to 0, disable Steam Networking. Useful to stop players from joining your game from the Internet.
+timedemo Console Command
+timedemoquit Console Command

Dedicated Server

Command-line arguments for the Source Dedicated Server executable (srcds.exe, srcds_run)


Command-Line Parameters

Argument Description
-allowdebug (Same as -debug ?)
-autoupdate Linux Autoupdate the game. Requires -steam_dir and -steamcmd_script to be set.
-binary <binary> Linux Use the specified binary (no auto detection).
-console Windows SrcDS will run in console mode.
-debug Run debugging on failed servers if possible. Requires -gdb to be set [confirm]
-debuglog <logname> Linux Log debug output to this file.
-dev Show developer messages.
-fork <number> (in all games since Left 4 Dead) Linux Starts up the specified number of instances as subprocesses at once. They will each use the first available port number at 27015 or above. When using this functionality, other server parameters support substitution. For instance, if you specify +exec autoexec##.cfg, then the first server will execute autoexec01.cfg, the second autoexec02.cfg, and so on.
-game <game or path> Specifies which game/mod to run. Accepts either a path to a gameinfo.txt, or one of these pre-set values.
-gdb <gdb> Linux Use <dbg> as the debugger of failed servers.
-help Linux ?
-insecure Starts the server without Valve Anti-Cheat.
-ignoresigint Linux Ignore signal INT (prevents CTRL+C quitting).
-ip Specifies the address to use for the bind(2) syscall, which controls on which IP addresses the program is reachable on. It must either be a local address (an addresses of the host it runs on) or 0.0.0.0 (the wildcard). This has nothing to do with externally-visible addresses in NAT setups.
-maxplayers <number> Specifies how many player slots the server can contain.
-netconport <number> (in all games since Left 4 Dead) Creates a remotely accessible server console on the specified port. This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
-netconpassword <password> (in all games since Left 4 Dead) If set, users must type PASS "password" to use the remote console described above
-nobots Disable bots.
-nohltv Disables SourceTV and closes its port (usually 27020).
-norestart Won't attempt to restart failed servers.
-notrap Linux Don't use trap. This prevents automatic removal of old lock files.
-port The port the server advertises to clients.
-steam Use this (along with -console) when you are running the version of SRCDS downloaded through Steam[confirm]. Original Description "Quit on steam update failure"
-steamcmd_script <path> Linux[confirm] Path to the steam script to execute. Example: ~/Steam/hl2_ds.txt.
-steamerr Linux Quit on steam update failure.
-steamuser Linux Steam user ID?
-steampass Linux Steam Login Password?
-steam_dir <path> Linux Dir that steam.sh resides in. Example: ~/Steam
-tickrate <number> Specifies Server-Tickrate (for more info see Source Multiplayer Networking). This cannot be altered on TF2 (except older versions), CSS (except older versions), L4D, and L4D2.
-timeout <number> Sleep for <number> seconds before restarting a failed server.
-dumplongticks Generate minidumps when there are long server frame