How to Check Current PHP Version in 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 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.

Check Current Installed PHP Version in Ubuntu

Command:

php -v

Output:

How to Check Current PHP Version in Ubuntu?

Check All Installed PHP Version in Ubuntu

Command:

update-alternatives --list php

.medrectangle-4-multi-155{border:none!important;display:block!important;float:none!important;line-height:0;margin-bottom:15px!important;margin-left:0!important;margin-right:0!important;margin-top:15px!important;max-width:100%!important;min-height:250px;min-width:300px;padding:0;text-align:center!important}

Output:

How to Check Current PHP Version in Ubuntu?

I hope it can help you…

Leave a Comment