Skip to content Skip to sidebar Skip to footer

How To Switch PHP Version on Ubuntu 22.04.1 LTS


Interactive switching mode

$ sudo update-alternatives --config php

should work for all ubuntu versions after 16.04 (18.04 and 20.04)

This is what you should see as a response
  There are 4 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
* 0            /usr/bin/php7.2   72        auto mode
  1            /usr/bin/php5.6   56        manual mode
  2            /usr/bin/php7.0   70        manual mode
  3            /usr/bin/php7.1   71        manual mode
  4            /usr/bin/php7.2   72        manual mode
Press enter to keep the current choice[*], or type selection number:
Choose the appropriate version
Jaka Surya
Jaka Surya Mobile Developer Flutter

Post a Comment for "How To Switch PHP Version on Ubuntu 22.04.1 LTS"