In Python, there are a few ways to exit the terminal. We are going to show you the exit() method because it doesn't prompt for confirmation and the method name is self explanatory. Type the following on your terminal: Other ways to exit the python terminal But there are other ways to achieve this: Exit() The command terminates Python in a safe way and stores your data correctly. It's important to write the after the word, or Python could understand that you want to know what the statement means. This is the reason why we're emphasizing the presence of the at the end. The syntax is quite straight forward: Using quit() The command follows the same syntax as . You'll need to add the at the end or you'll receive the same message as before. Using shortcuts Keyboard shortcuts are common use among us developers because they save time and make you work faster. Here you have the shortcuts for Windows and Unix Systems (Linux and MacOS). Using CTRL+z on Windows Before pressing to exit Python just make sure your Python terminal is the selected windows, and then press , hold it down and press and then . You will see a message: Using CTRL+d on MacOS and Linux On Unix systems such as MacOS or Linux, will not exit Python on the terminal. The keyboard shortcut for exiting Python on these systems would be and on these systems you don't need to confirm with because their terminal will receive and execute this command immediately. We will do as we did with the Windows shortcut. Press and hold and then press to exit Python from the terminal making sure the terminal is the selected window. You can read more related topics at like for example . Hope you enjoy the reading and keep on the Geek side!