How To Install Php On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Php On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

php

PHP command line interface.
Homepage: .

Maintainer: Debian PHP Maintainers


Section: php

Install php

  • Debian apt-get install php Click to copy
  • Ubuntu apt-get install php Click to copy
  • Alpine OS apk add php Click to copy
  • Arch Linux pacman -S php Click to copy
  • Kali Linux apt-get install php Click to copy
  • CentOS yum install php-cli Click to copy
  • Fedora dnf install php-cli Click to copy
  • Raspbian apt-get install php Click to copy
  • macOS brew install php Click to copy
To install the latest version of php in your favorite operating system just copy the php installation command from above and paste it into terminal. It will download and install the latest version of php 2026 package in your OS.