hostfile Command

hostfile [File Name]

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.


Arguments are parameters that you add to a command. Find information about this command's arguments below.

File NameOptional - 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.

Extra Info

Sv_cheats Required? No
Client or Server Command? Server
Default Value 0

hostfile Examples

Find below working examples of this command (copy and paste into console).

hostfile hosts.txt

This command sets the hostfile to default.

hostfile examplehosts.txt

This command sets the hostfile the server will use to examplehosts.txt.