How to Check Current PHP Version in Ubuntu?

By Hardik Savani May 14, 2024 Category : PHP Ubuntu

Hey Dev,

This detailed guide will cover how to check installed php version in ubuntu. you can see how to check current php version in ubuntu. I’m going to show you about check php version command line linux. I explained simply about ubuntu check php versions installed.

If you want to check your current installed PHP version in ubuntu, Then I will help you how to check it. we can use php -v command to check current running PHP version in ubuntu. let's see an example command with output:

You can use this command with your ubuntu 22.10, ubuntu 22.04, ubuntu 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.

Check Current Installed PHP Version in Ubuntu


php -v


Check All Installed PHP Version in Ubuntu


update-alternatives --list php


I hope it can help you...

Tags :