In this post I am going to explain how to get Magento 2 edition and version.

1. Using Dependency Injection

Add below code snippet in Block class.

Add below code snippet in template file.

2. Using Object Manager

It will return edition name like Community or Enterprise and the version like 2.3.5-p1.