Magento – SSH “Could not open input file: bin/magento”

shellssh

I'm working through the Hello World tutorial and it's time for me to enter the "$ php bin/magento setup:upgrade" command for the reason mentioned in the tutorial but I get the error: "Could not open input file: bin/magento" and when I try to navigate to the Magento dir in bin it doesn't exist.

enter image description here

enter image description here

Help please? What am I doing wrong?

Best Answer

the first error seems to say, that the bash can't find php.

edit: like versedi stated in the comments, the first error is raised because you copied the $ sign into the command.

also you just have to run bin/magento setup:upgrade

If you run cd bin first, it it ./magento. The . points to the current directory. Otherwise, it searches for the magento command in your executable paths, which you can see by executing echo $PATH.

Eventually, you have to give it execute permissions first. You can do this by running chmod +x bin/magento