Terminal initialization.