download composer for magento 2 code example
Example: install magento 2 using composer
1
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>
1
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>