Your question is a good illustration of a grammatical problem many beginners face: How to refer to specific parts of a preceding clause.
As a demonstrative pronoun, that introduces a restrictive relative clause and serves as a substitute within that clause for the substantive modified by the clause. In other words, the clause following that explains the word or phrase that immediately precedes it, in this case "operating system".
If you want to refer back to the subject of the preceding clause (in your case "terminal interface"), you would use a personal pronoun, in your case "it" (as interface is a thing, not a person). You could do that in two ways:
A Terminal Interface is used to interact with the Operating
System and it acts as an intermediary between the user and the computer hardware.
A Terminal Interface is used to interact with the Operating
System. It acts as an intermediary between the user and the computer hardware.
But since you want to refer back to the prase that precedes the pronoun, you need to use "that". That is, the example as you give it is correct and means what you want it to mean.