Show multiple term references as ID in one row
Change field Formatter

If you're showing the actual Content field you can change the Formatter. Instead of using Label use Entity ID under Formatter. 

This will output Term IDs instead of term names, and all the Multi-valued settings will apply the same way as for the names output. 

Rewrite results with TID replacement token

Another way or changing the field output in D8 views (if the Formatter option isn't available for example) is to use the Rewrite results &gt; Override the output of this field with custom text and enter the token for the TID in there. You can look up the correct token pattern under Replacement patterns below the Text area. 

That is also how you would get the TID to display instead of the name if you use the field Content: All taxonomy terms.