magento2 version from command line code example
Example: magento 2 check version command line
#From your root folder, run this cli command
bin/magento --version
#From your root folder, run this cli command
bin/magento --version