How to Build an Existing Project from the Command Line on Linux

Hello,

I have created a project in the Linux Unity Editor and can build that project using the Editor. How would I build the project from the command line on Linux? Sorry if this question has been asked before – I couldn’t find any relevant documentation or resources online specific to Linux.

Unity 2019.3.0f1
Ubuntu 16.04

Thanks,

Thomas

Was Looking for the same thing still looking.

You can find the Unity executable file inside of [install path]/[Unity version]/Editor/Unity. (The install path can be configured inside Unity Hub.)
You can launch Unity by writing that file path in a terminal, and you can pass arguments as you normally would:
[Unity install path]/[Unity version]/Editor/Unity [arguments]

For example, you could try something like this (your paths may vary):

cd '~/Documents/Unity Project'
/opt/UnityHub/2019.4.1f1/Editor/Unity -quit -batchmode -projectPath "$(pwd)" -buildLinux64Player "$(pwd)/Linux Build/build-name.x86_64"