How to Install a Magento 2 on localhost

So many people as beginners of Magento 2 often get problem with Magento 2 installation and Command Line. Today i will share my experience in this job.

I suppose the project named: magento-2.1.0 (relative path looks like xampp/htdocs/magento-2.1.0/)

You install this project follow magento's guide http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html

I just want to instruct the way to use the Command Line.

After you completed Magento 2 Installation, you need to run some command:

- Open Xampp as below screenshot

Of course we have a few ways to run command line but this is my favorite way

Then type:

cd htdocs\magento-2.1.0\bin [Enter]

php magento setup:static-content:deploy [Enter]

php magento indexer:reindex [Enter]

Done!! Your Magento 2 installation completed

If you want to install the extensions for this project, you just need type command:

php magento setup:upgrade [Enter]

php magento static-content:deploy [Enter] ( this command applys to extension including js, css, html files in web directory)