How Do I Run Python in Ubuntu Terminal?

How Do I Run Python in Ubuntu Terminal?
Contents

How do I run python on Ubuntu?

Open a terminal window and type ‘python’ (without the quotes). This opens python in interactive mode. While this mode is good for initial learning, you may prefer to use a text editor (like Gedit, Vim or Emacs) to write your code. As long as you save it with the .

How do I run python from terminal?

To start a Python interactive session, just open a command-line or terminal and then type in python , or python3 depending on your Python installation, and then hit Enter . Here’s an example of how to do this on Linux: $ python3 Python 3.6.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.