Magento is one of their most popular eCommerce platforms that continues on releasing new versions with some updates and bug fixes.

To keep up with the pace of your competition you have to update Magento regularly to benefit from new features and save your store from unnecessary troubles. However, to do that you have to have significant knowledge about your current version.

There are several ways you can use to check the Magento 2 version. 

1. Check Magento version via Admin Panel

In order to check the Magento version, you need to log into your Magento Admin Panel. Once you scroll down the page, you will see the Magento version in the bottom (footer) right corner. 

Magento 2 Magento Version,Magento Admin Panel

2. Check Magento version using CLI

Besides, you can check Magento version with the CLI. To do this navigate to your Magento 2 base directory and run the following command:

php bin/magento --version

The result should be like this:

Magento CLI 2.3.2

3. Get Magento version programmatically

To check Magento version of website programmatically in code you need to have a ProductMetadataInterface object. You can define it in your PHP class constructor, e.g.:

private $productMetadata;

public function __construct(
    ...
    \Magento\Framework\App\ProductMetadataInterface $productMetadata,
    ...
) {
   $this->productMetadata = $productMetadata;
   parent::__construct(...);
}

And then check Magento version using $this->productMetadata object, e.g.:

$version = $this->productMetadata->getVersion();

You can also easily get the Magento edition, e.g. Community or Enterprise, using this code:

$edition = $this->productMetadata->getEdition();

4. Get Magento Version From URL

If you don't have access to the Magento 2 website admin panel, CLI, or code, you can still try to check Magento version using this URL:

https://magento2store.com/magento_version

Note: you need to replace "https://magento2store.com/" with the actual store base URL.