disable the tx2 serial console (/dev/ttyS0)in ubuntu18.04

I want to use the tx2 /dev/ttyS0 as Serial Communication with other device.but it is used as the linux console.
So,I want to disable it as the console. and use it like the other serials (/dev/ttyTHS*).
How can I do?

You might find this thread of interest:

The thread is a bit older, but I believe this is still correct information. That thread shows how to move serial console to a different console, but all you would need to do is skip the part of moving to a new UART.