Command Profile

HOSTFILE

CS2 CS:GO

This command can be used to set the hosts file (default is hosts.txt). If no argument is specified, this command will print to console the name of the hosts file the server is currently using.

Syntax
hostfile [File Name]

Description

This command can be used to set the hosts file (default is hosts.txt). If no argument is specified, this command will print to console the name of the hosts file the server is currently using.

How To Use hostfile

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter hostfile [File Name], replacing bracketed arguments with the value you want, then press Enter.

This command is listed as compatible with Counter-Strike 2.

Syntax And Arguments

hostfile [File Name]
File Name Optional - if not specified, the name of the hostfile the server is currently using will be printed to console. The name of the file you wish to set as the server's hostfile.