#development #linux #php #terminal
Today, it's about a simple task: switching PHP versions on the command line in Ubuntu:
1sudo update-alternatives --set php /usr/bin/php8.1
It works the same for the other PHP commands:
1sudo update-alternatives --set phar /usr/bin/phar8.1
2sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.1
3sudo update-alternatives --set phpize /usr/bin/phpize8.1
4sudo update-alternatives --set php-config /usr/bin/php-config8.1
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.