# To show a list of PHP versions
sudo update-alternatives --config php
# Example Results:
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php7.4 74 auto mode
1 /usr/bin/php7.0 70 manual mode
2 /usr/bin/php7.1 71 manual mode
3 /usr/bin/php7.2 72 manual mode
4 /usr/bin/php7.3 73 manual mode
* 5 /usr/bin/php7.4 74 manual mode
# Then Choose the number in front of each PHP version to switch to different PHP version for Command Line.
Categories