<p>
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Update the package lists.
sudo apt update

# Install PHP.
sudo apt install -y php
</code></pre>
