How to Check Python Version in Linux Terminal

CodeWithRonny
Mar 17, 2024

--

Let’s take a closer look how you can find default python version in Ubuntu. Before installing Python, check weather you have it on your system. Open your terminal and run the following command.

Method 1: Simply you have to run the command python3 --version

python3 - version

Terminal Output:

https://codewithronny.com/wp-content/uploads/2024/03/How-to-Check-Python-Version-in-Linux-Terminal.png

Method 2: Write this simple command python3 on your terminal and hit the Enter button.

python3

Terminal Output :

https://codewithronny.com/wp-content/uploads/2024/03/How-to-Check-Python-Version-in-Linux-Terminal-Output-1.png

Now you have to exit, Use Python built-in function exit()

exit()

https://codewithronny.com/wp-content/uploads/2024/03/How-to-Check-Python-Version-in-Linux-Terminal-Output-exit.png

You can read full article here

--

--

CodeWithRonny
CodeWithRonny

Written by CodeWithRonny

0 Followers

As a web developer, I merge creativity with functionality, translating ideas into dynamic, user-friendly websites using HTML, CSS, JavaScript, PHP, and Python.

No responses yet