magento 2.4 install with composer install code example

Example 1: install magento 2 using composer

1
 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>

Example 2: install magento 2

php bin/magento setup:install --base-url="http://magento2.local/" --db-host="localhost" --db-name="magento" --db-user="magento" --db-password="mage3nt0" --admin-firstname="admin" --admin-lastname="admin" --admin-email="[email protected]" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago"  --use-rewrites="1"  --backend-frontname="admin"