How to enter commands and print to commandline in headless mode?

Headless Mode seems to have very little documentation at all, with no examples online to learn from. Could someone be so kind to share how to print and send commands to a headless client running from ubuntu console?

Console.Writeline does nothing, Debug.Log prints to log file but not to console, print() prints to log file but not console.

My headless client starts up fine with: ./server.x86_64 -batchmode -nographics -logfile log.txt

But if I’m trying to run a headless unity client as a server on my dedicated server running ubuntu, how can I send commands and print to console if it wont print or receive any commands at all?

It would be awesome if someone could post a simple tutorial or guide on how to get the headless mode going to send commands through console and print through debug etc to the console. The community would really appreciate it im sure.

Thanks!

P.S. Unity people, please make more documentation on this feature that you’ve built for us. It’s great you have headless mode but not great if no one knows how to use it - and there are plenty of questions asking the same thing I am without answer.

% ./server.x86_64 -batchmode -nographics -logfile log.txt &
% tail -f log.txt