In the terminals at the top right there is a close button you can click at anytime it won't end the task you can also type quit into the terminal and it will close the terminal window