Temporarily clear the terminal in Linux
问题 I want to write a GUI/Terminal based application where I would need to clear the terminal and then write out the gui. But how do I reset the terminal back to normal once the application is finished? 回答1: Terminals (such as xterm and "any" which emulate it) support a feature called the alternate screen. Often, terminal descriptions include switching to/from the alternate screen in the smcup and rmcup capabilities, and it is used by ncurses applications. (The feature is not always used, because