command in magento 2 code example

Example 1: frequently used commands in magento 2

php bin\magento module:status
php bin\magento module:enable module_name
php bin\magento setup:upgrade
php bin\magento deploy:mode:show   -->current mode
php bin/magento deploy:mode:set developer
php bin/magento cache:clean  -->to clean chache
php bin/magenot list
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex
bin/magento indexer:info
bin/magento indexer:status
bin/magento indexer:reset

Example 2: magento ssh commands

php bin/magento cache:status
/usr/bin/php-cli /usr/www/users/<ftp username>/bin/magento cache:status