Sean Breeden

Full Stack PHP, Python, AI/ML Developer
"Five card stud, nothing wild. And the sky's the limit" --Captain Jean Luc Picard

How to switch the currently active version of PHP in Ubuntu at the command line

Tuesday, August 10th, 2021

Open a Terminal in Ubuntu (CTRL + ALT + T)

At the prompt, type:

sudo update-alternatives --config php


Select the version of PHP that is needed from the menu.

Menu that appears after typing the PHP switch command


Verify that PHP switched with php -v

Output from the php -v command

Views: 1123
| Home | Announcements | Artificial Intelligence | Commodore 64 | CraftCMS | Crypto | Games | Geek | Machine Learning | Magento | Memes | Science News | Security | 7 Days to Die | Ubuntu |