Home>Article>Operation and Maintenance> How to check whether php is installed in linux
1. Check the current php version through the php -v command
php -v
If php is not installed, you will generally be prompted that there is no php command.
(Video tutorial recommendation:linux video tutorial)
2. Check whether there is php
# in the installed package ## Taking redhat as an example, you can execute the following command:rpm -qa | grep phpAs shown in the figure below, it means that php is installed.
##3. Use the list parameter of the pear command to view the installed PHP support
pear is a PHP extension and application repository ("PHP Extension and Application Repository") abbreviation of. After installing php, some of pear's libraries will be automatically installed by default, so you can use the pear command to determine whether to install php. Execute the following command:
pear list
As shown in the figure below, it means it is installed. php.
Recommended tutorial:
linux tutorialThe above is the detailed content of How to check whether php is installed in linux. For more information, please follow other related articles on the PHP Chinese website!