tset initializes terminals. tset first determines the type of terminal that you are using. This determination is done as follows, using the first terminal type found.