How to compile to linux?

Hey veccher-

First, you will want to make sure you are using a source build of the engine from GitHub to make use of cross-compiling. I would suggest following this documentation which is similar to the second link that you provided but also includes links to download the toolchain binaries:

The info necessary for setting up the environment variables should be in one of the text files after this is installed. It should have LINUX_ROOT= followed by a file path on your computer. The part before the equal sign goes in the Variable name field and everything after the equal goes into the Variable value. After this you will need to run GenerateProjectFiles.bat for the specific source engine you are using and then build the engine in Visual Studio again. There are a few other programs (UnrealPak, ShaderCompileWorker, etc) that need to be built as well, this can be found below the image on the linked page.

Cheers