Check Python Version On Linux Link Jun 2026
Most modern systems treat python3 as the primary executable. Run python3 --version to see the exact release, such as Python 3.13.0 .
The easiest way to check is by using the --version or -V flags. Open your terminal (often with Ctrl + Alt + T ) and try these commands: python --version Use code with caution. Copied to clipboard
python3 --version
whereis python – Lists all locations where Python binaries are found on your system. 4. Checking Within Virtual Environments
This is because modern Linux distributions have removed the generic python command to avoid ambiguity between Python 2 (legacy) and Python 3 (current). check python version on linux
Run this in your terminal:
You can check exactly which binaries are installed using the which command or by looking at the version numbers directly: Most modern systems treat python3 as the primary executable
python3 -V
You can also use which -a python3 to find all instances of that command across different directories. 3. Checking Version Programmatically (Inside a Script) Open your terminal (often with Ctrl + Alt
The most common way to check your version is through the command line. Open your terminal (often using Ctrl+Alt+T ) and enter one of these commands:
Note: In some distributions, python still points to legacy Python 2.x. python3 --version Use code with caution. Copied to clipboard This is the recommended command for modern development. The shorthand version: python3 -V Use code with caution. Copied to clipboard 2. Checking via the Python Interpreter