You did four commands.
The first one simply renamed 'php' to 'php.old'. That's why the system cannot find 'php' anymore - it's called something else now.
The other three commands did nothing because you entered nonsense. There is no such path as '/path/to/php/'. You were supposed to change that to reflect the REAL path to php.
Use mv
to restore your php: mv /usr/bin/php.old /usr/bin/php
. Since this is outside your /home directory, you must prepend sudo
.
It's wise to avoid magic shell incantations until you understand:
- Exactly what the command does, and exactly what each element of the command does.
- How to undo it if you make a mistake.
One more thing: Since the first command worked, that seems to indicate that you are using root instead of sudo. Run away from any instructions for new users to use root in Ubuntu. Non-judicious use of root risks destroying your system with ordinary human typographic mistakes...which newer users make frequently. You made three among those four commands!
ln -s /path/to/php/bin/php /usr/bin/php
"? If so, was there any kind of error?