Magento 2 useful commands

Here’s a list of Magento 2 commands that I use frequently:

bin/magento deploy:mode:show //show current application mode
bin/magento deploy:mode:set //set application mode, possible values are default, developer, production

bin/magento cache:clean //Clean cache
bin/magento cache:flush //Flushes cache storage, this will clear all frontend sessions

bin/magento module:enable Module_Name //enable a module
bin/magento module:disable Module_Name //disalbe a module

bin/magento indexer:reindex //reindex all index
bin/magento setup:upgrade //update all modules

To display all available commands, use

bin/magento list