3

ALL Basic Commands I am new in Magento 2 but require I necessary commands including bash commands and git command to working with Linux based system ,

0

Magento Commands

/opt/plesk/php/7.0/bin/php  bin/magento module:enable IWD_Opc 

/opt/plesk/php/7.0/bin/php bin/magento module:status



cat bin/empty_json > /var/www/vhosts/u21132485.onlinehome-server.com/magentotest.u21132485.onlinehome-server.com/pub/static/adminhtml/Magento/backend/en_US/js-translation.json

cat bin/empty_json > /var/www/vhosts/u21132485.onlinehome-server.com/magentotest.u21132485.onlinehome-server.com/pub/static/frontend/Sm/market/en_US/js-translation.json


 /opt/plesk/php/7.0/bin/php  bin/magento cache:flush
 /opt/plesk/php/7.0/bin/php  bin/magento cache:clean

 /opt/plesk/php/7.0/bin/php -f bin/magento setup:upgrade


 /opt/plesk/php/7.0/bin/php -d memory_limit=2000M bin/magento setup:static-content:deploy -f

 /opt/plesk/php/7.0/bin/php bin/magento set:upg

 /opt/plesk/php/7.0/bin/php -d memory_limit=2000M bin/magento indexer:reindex

 /opt/plesk/php/7.0/bin/php  deploy:mode:set developer

git commands

git pull origin beta0.2

git add -A stages all changes

git add . stages new files and modifications, without deletions

git add -u stages modifications and deletions, without new files

git commit -m "discard changes"

git log

git checkout 7e7eaf42a8bb07855b6f2f242f62ff944560eb50

git log --oneline --graph --color --all --decorate

git checkout 76fc7e8a

git checkout -b beta0.2 76fc7e8a

Bash commands

Shows the last 10 lines from an error log. 
tail -n 10 -f var/log/system.log
tail -n 10 -f error.log
tail -f error.log
chmod -R 777 /www/store
mv foldername/ ../ 

If you are going for a console command it would be: chmod -R 777 /www/store. The -R (or --recursive) options makes it recursive.

You can also use mv to move a whole directory and its content:

/pub/media/catalog/product/placeholder/default/

tar -xzf pubbkp.tar.gz

//show all hidden file in a directory
ls -ld .?* 


zip -r backup.zip * -x "backup_old/*" "old/ignoreDir2/*"

mv includes/* ./`enter code here`
0
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento cache:flush
php bin/magento cache:clean

php bin/magento module:status
php bin/magento module:enable Algolia_AlgoliaSearch
php bin/magento module:disable Algolia_AlgoliaSearch

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy


php bin/magento deploy:mode:show
php -dmemory_limit=5G bin/magento deploy:mode:show
php -dmemory_limit=5G bin/magento cache:clean

php -dmemory_limit=5G bin/magento setup:static-content:deploy
php -dmemory_limit=5G bin/magento setup:di:compile
php -dmemory_limit=5G bin/magento indexer:reindex
php -dmemory_limit=5G bin/magento cache:flush
php -dmemory_limit=5G bin/magento cache:clean

php -dmemory_limit=5G bin/magento module:status

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.