

If your server is running Docker, you can simply use:ĭocker run -d -net=host -name=tf2-dedicated -e SRCDS_TOKEN= -it -name=tf2-dedicated2 cm2network/tf2 means current working directory, the directory in which commands entered into the terminal will be executed. A command prefixed by $ (a dollar sign) is meant to be run as a regular user without root permissions.An alternative would be to use the su command to make all following commands run as root, although this is not recommended. Most distributions have a separate root account for other distributions such as Ubuntu, Linux Mint and Crunchbang, prepending sudo to a command will ensure that the command is run as root.

A command prefixed by # (a hashtag) is meant to be run as root.This article has been written according to standard Linux terminal documentation syntax, meaning the following: 3.5 Create a shell script to run the server.3.4 Creating/Updating server configuration files.3.2 Download and install the SteamCMD Tool.Information on that page and this one may also be useful on other Unix-like platforms. Check that page for additional details and suggestions. NOTE: Information about running a server on Windows is often applicable on Linux, for example, files like server.cfg and motd_default.txt are identical between platforms.

It is recommended that you check your package manager's repositories for the required packages before continuing. In the example below, the server is installed into the user's home directory in a directory called hlserver.īasic installation and configuration of a dedicated server is almost the same on most Linux distributions, but small details, such as package names and directories may differ from distribution to distribution. This is a setup guide that walks you through the installation process of a basic Team Fortress 2 dedicated server on GNU/Linux (x86 or amd64) or a FreeBSD (x86 or amd64) system with Linux compatibility patches running in it's kernel. This guide assumes that the reader has a basic understanding of using the Linux command line.
