How to Install PHPStorm on Ubuntu 22.04 or 20.04

For PHP developers seeking an optimized coding experience, installing PHPStorm on Ubuntu 22.04 Jammy Jellyfish or Ubuntu 20.04 Focal Fossa LTS Linux is an excellent choice. Developed by JetBrains, this Integrated Development Environment (IDE) is feature-rich and designed to enhance productivity.

Key Features of PHPStorm

  • Smart Code Navigation: Efficiently navigate through code, saving valuable time.
  • Code Quality Analysis: Automated checks for clean and high-quality code.
  • Testing and Debugging: Integrated tools for easier debugging.
  • Database Tools: In-IDE database management capabilities.
  • VCS Integration: Support for popular version control systems like Git and SVN.

Unique Qualities

  • Rich Ecosystem: Built on the IntelliJ IDEA platform for robust performance.
  • Language Support: Versatility with support for multiple web development languages.
  • Seamless Integration: Compatibility with popular web technologies like Symfony and Laravel.
  • Live Edit: Real-time synchronization between code and design view.

Its robust features and adaptability make PHPStorm a go-to IDE for PHP development. The subsequent guide will detail the installation process on Ubuntu 22.04 or 20.04, covering methods such as APT, Snap, and Flatpak.

Section 1: Install PHPStorm on Ubuntu 22.04 or 20.04 via APT PPA

APT, which stands for Advanced Packaging Tool, is a powerful package management system used by Ubuntu and other Debian-based distributions. It provides high-level commands for handling packages, which improve efficiency. We’ll use it to install PHPStorm in this section.

Step 1: Refresh and Upgrade the Ubuntu System Before PHPStorm Installation

The first step involves updating your Ubuntu system’s local package database. We do this to ensure that we have the latest information about what packages and versions are available from Ubuntu’s repositories:

sudo apt update

Once the package database is updated, we proceed to upgrade the system. This operation upgrades all the installed software packages on your system to their latest versions:

sudo apt upgrade

Step 2: Install Initial Packages For PHPStorm APT PPA on Ubuntu

Now, we move on to installing the required packages. These include dirmngr, ca-certificates, software-properties-common, apt-transport-https, curl, and lsb-release. These tools are necessary to add and manage repositories, transfer files, and perform other tasks:

sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl lsb-release -y

Step 3: Import the JetBrains PPA by Jonas Groeger on Ubuntu for PHPStorm

In this step, we will add the JetBrains Personal Package Archive (PPA) into our system’s list of repositories. This will allow APT to fetch PHPStorm directly from JetBrains’ PPA.

To ensure the authenticity of the packages, we start by importing the GPG key for the JetBrains repository. GPG, or GNU Privacy Guard, is a tool for secure communication that implements the OpenPGP standard. By importing the GPG key, we verify that JetBrains indeed provides the packages in the repository:

curl -s | gpg --dearmor | sudo tee /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg > /dev/null

After the GPG key is imported, we proceed to add the JetBrains PPA to our system’s list of package sources:

echo "deb [signed-by=/usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg] any main" | sudo tee /etc/apt/sources.list.d/jetbrains-ppa.list > /dev/null

Step 4: Updating the APT Packages Index After PHPStorm PPA Import on Ubuntu

We’ve added a new repository in the previous step. Therefore, we need to update our APT package database again to fetch the package information from the newly added JetBrains PPA:

sudo apt update

Step 5: Install PHPStorm on Ubuntu 22.04 or 20.04 via APT Command

Finally, we install PHPStorm. At this point, our system knows about the PHPStorm package from the JetBrains PPA, and it’s ready to fetch and install it by running the following APT install command:

sudo apt install phpstorm

Upon running the above command, APT will download PHPStorm any dependencies it needs and install them on your system. After completing the installation, you can launch PHPStorm from your applications menu.

Section 2: Install PHPStorm on Ubuntu 22.04 or 20.04 via Snap

Snap, developed by Canonical, is a software deployment and package management system for Linux. It simplifies the installation and maintenance of software and is becoming increasingly popular. In this section, we will explore installing PHPStorm using Snap.

Step 1: Verifying Snap’s Presence on Your Ubuntu System

As Snap is created by Canonical, it comes pre-installed on Ubuntu distributions. However, if for any reason it isn’t present on your system or has been manually removed, you can reinstall it using the following command:

sudo apt install snapd -y

This command installs the Snap Daemon (snapd), a background service responsible for managing and maintaining your Snap packages.

Step 2: Enable Classic Snap Support For PHPStorm on Ubuntu

Specific Snap packages employ ‘classic’ confinement, a feature that provides snap access to your system’s resources like traditional software. To enable this support for maximum compatibility and smooth operation, a symbolic link (symlink) is created using the following command:

sudo ln -s /var/lib/snapd/snap /snap

This command creates a symlink between’/var/lib/snapd/snap’ and ‘/snap,’ effectively enabling classic Snap support.

Step 3: Install Core Snap For PHPStorm on Ubuntu

Before installing PHPStorm, it’s crucial to install the ‘core’ snap. The core snap serves as a base for other snaps, providing essential libraries and services they depend upon. This preemptive measure helps to avoid potential conflicts and issues down the line. The command to install the core snap is:

sudo snap install core

Step 4: Install PHPStorm on Ubuntu 22.04 or 20.04 via Snap Command

With all the prerequisites, we are now prepared to install PHPStorm. This can be accomplished using the following command:

sudo snap install phpstorm --classic

Here, sudo grants administrative privileges, snap calls the Snap package handler, install is the command to install a package, and ‘phpstorm’ is the package we want to install. The --classic option allows PHPStorm to access your system’s resources like a traditionally packaged application.

Section 3: Install PHPStorm on Ubuntu 22.04 or 20.04 via Flatpak and Flathub

Flatpak is a versatile universal package management system for Linux, akin to Snap. Its unique feature is the ability to isolate applications from the rest of your system, thereby enhancing security and mitigating potential conflicts. This section provides a comprehensive walk-through on the installation of PHPStorm using Flatpak and Flathub.

Step 1: Enable the Flathub Repository for PHPStorm on Ubuntu

Before installing PHPStorm via Flatpak, the initial requisite is to enable the Flathub repository. Flathub is an established hub for hosting Flatpak applications. It essentially serves as a marketplace to access and install various applications.

To incorporate the Flathub repository, execute the following command in your terminal:

sudo flatpak remote-add --if-not-exists flathub

This command incorporates the Flathub repository into your Flatpak configuration. As a result, you gain access to an extensive catalog of applications, including PHPStorm.

Step 2: Install PHPStorm on Ubuntu 22.04 or 20.04 via Flatpak Command

With the Flathub repository now integrated, the subsequent phase involves the installation of PHPStorm. For this, the flatpak install command is utilized. Here’s the specific command to install PHPStorm:

flatpak install flathub com.jetbrains.PhpStorm -y

This command installs PHPStorm from the Flathub repository, ensuring you have the most recent stable version of the application.

If your system doesn’t currently support Flatpak, it needs to be installed first. Detailed instructions on how to install the most recent supported version of Flatpak on Ubuntu are available in our guide on installing Flatpak.

Section 4: How to Launch PHPStorm on Ubuntu 22.04 or 20.04

Launching PHPStorm on Ubuntu can be accomplished using different approaches. Here, we’ll take you through two fundamental methods, one involving the command-line interface (CLI) and the other one using the graphical user interface (GUI).

CLI Method to Launch PHPStorm on Ubuntu

In a Linux environment, one often employs commands to perform various actions. Launching an application like PHPStorm is no exception. The following subsections illustrate how to launch PHPStorm using APT, Snap, and Flatpak commands.

Launching PHPStorm using the APT command:

To launch PHPStorm using the APT command, open your terminal and type:


If PHPStorm is installed properly, this will initiate the Integrated Development Environment (IDE).

Launching PHPStorm using the Snap command:

If you’ve installed PHPStorm using Snap, use the following command in your terminal:

snap run phpstorm

This will launch PHPStorm, given that it’s correctly installed.

Launching PHPStorm using the Flatpak command:

For users who have installed PHPStorm via Flatpak, you can launch it by executing this command in the terminal:

flatpak run com.jetbrains.PhpStorm

As always, PHPStorm will launch if it has been installed appropriately.

GUI Launch Method for PHPStorm on Ubuntu

Launching PHPStorm can be done using the GUI in Ubuntu for users who prefer a more visually oriented method. Here’s the step-by-step process:

  • Click on the Activities menu at your desktop screen’s top left corner.
  • Then select the Show Applications icon at the bottom of the Activities overlay.
  • Scroll through your applications or use the search bar to find PHPStorm.
  • Click on the PHPStorm icon to launch the IDE.

The advantage of using the GUI method is that it’s intuitive and requires no prior knowledge of terminal commands. However, remember that the CLI method provides more flexibility and control and is often the preferred method for many Linux users.

PHPStorm application icon displayed on Ubuntu 22.04 or 20.04 Linux desktop.Pin
Screenshot showing the PHPStorm application icon on an Ubuntu 22.04 or 20.04 Linux desktop.

Section 5: Getting Started with PHPStorm on Ubuntu 22.04 or 20.04

PHPStorm is a highly powerful Integrated Development Environment (IDE) from JetBrains, popular among PHP developers. Here are a few key tips and best practices to enhance your experience with PHPStorm on Ubuntu Linux.

PHPStorm Customizations on Ubuntu

PHPStorm offers extensive customization options, allowing you to adapt the IDE to your workflow. Here are a few to consider:

  • Themes: PHPStorm supports various themes for customizing the appearance of your IDE. You can switch between themes by navigating to File > Settings > Appearance & Behavior > Appearance > Theme.
  • Keymap: PHPStorm allows you to modify key bindings according to your comfort. To edit the keymap, head over to File > Settings > Keymap. From here, you can assign shortcuts to various actions within the IDE.
  • Plugins: Enhance your IDE’s functionality with a variety of available plugins. To install a plugin, navigate to File > Settings > Plugins. You can search for plugins and install them directly from this window.
  • Code Styles: You can adjust the code formatting settings according to your project requirements. Visit File > Settings > Editor > Code Style to set your preferred styles.

General Usage Tips for PHPStorm on Ubuntu

Now, let’s look at some usage tips to increase your productivity with PHPStorm:

  • Autocompletion: PHPStorm’s intelligent code autocompletion can be a great asset. Start typing, and the IDE will suggest relevant code components.
  • Quick Fix: PHPStorm’s “Quick Fix” feature automatically detects issues in your code and suggests corrections. To use it, press Alt + Enter when your cursor is at the problematic code line.
  • Live Templates: PHPStorm provides live templates, which are code snippets that can be inserted into your code by typing their abbreviations and pressing Tab. You can also create templates in File > Settings > Editor > Live Templates.
  • Version Control: PHPStorm supports various version control systems like Git, Mercurial, and SVN. You can easily commit changes, create branches, and view diffs from within the IDE.

Other Helpful Tips for PHPStorm on Ubuntu

Lastly, here are some additional tips that might be useful:

  • Terminal: PHPStorm has an integrated terminal. You can access it via the bottom toolbar or by pressing Alt + F12. This terminal uses your system’s default shell.
  • Database Support: PHPStorm comes with tools for working with databases. You can connect to a database, run queries, view schemas, compare DB versions, and more.
  • Regular Expressions: PHPStorm provides a built-in tool for testing regular expressions. You can access it via Edit > Find > Test RegExp.
  • Profiler: PHPStorm integrates with Xdebug and Zend Debugger to optimize your PHP code for step-by-step debugging and profiling.

Mastering PHPStorm can significantly improve your development productivity. Take your time to explore the features, customize the IDE to your liking, and practice the shortcuts. Remember, the best way to get comfortable with PHPStorm is by using it regularly in your coding tasks.

Default screen of PHPStorm IDE running on Ubuntu 22.04 or 20.04 Linux.Pin
Screenshot of the default screen of PHPStorm IDE on an Ubuntu 22.04 or 20.04 Linux system.

Section 6: PHPStorm Additional Commands on Ubuntu 22.04 or 20.04

In this section, we’ll explore the processes of updating and removing PHPStorm on your Ubuntu Linux system using various command-line methods. Each package manager has unique commands for performing these operations, and we’ll explore those associated with APT, Snap, and Flatpak.

Update PHPStorm on Ubuntu 22.04 or 20.04

We regularly update software packages, including PHPStorm, to ensure we benefit from the latest features, bug fixes, and security enhancements. Here’s how to update PHPStorm with different package managers.

Updating PHPStorm with the APT command on Ubuntu:

To update PHPStorm using APT, we’ll first update the package list to ensure we have information about the latest versions of all packages, including PHPStorm. After that, we’ll upgrade the packages. The following commands execute these steps:

sudo apt update
sudo apt upgrade

Updating PHPStorm with the Snap command on Ubuntu:

Updating PHPStorm with Snap is straightforward and requires a single command:

sudo snap refresh

Updating PHPStorm with the Flatpak command on Ubuntu:

Flatpak also allows easy updating of PHPStorm with a simple command:

sudo flatpak update

Each command updates all out-of-date packages, a recommended practice to keep your system secure and running smoothly.

Remove PHPStorm on Ubuntu 22.04 or 20.04

If, for some reason, you wish to remove PHPStorm from your Ubuntu Linux system, here’s how you can do it.

Removing PHPStorm with the APT command on Ubuntu:

To remove PHPStorm using APT, issue the following command:

sudo apt remove phpstorm

If you don’t plan on reinstalling PHPStorm or using the third-party APT PPA for other JetBrains products, you can also remove the repository and GPG key with these commands:

sudo rm /etc/apt/sources.list.d/jetbrains-ppa.list
sudo rm /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg

Removing PHPStorm with the Snap command on Ubuntu:

sudo snap remove phpstorm

Removing PHPStorm with the Flatpak command on Ubuntu:

Lastly, to uninstall PHPStorm using Flatpak, use the command:

sudo flatpak uninstall com.jetbrains.PhpStorm


PHPStorm is a compelling integrated development environment, and having it readily accessible on your Ubuntu Linux system is a tremendous asset. We’ve discussed the various methods of installing PHPStorm, including via the APT, Snap, and Flatpak package managers. We’ve also delved into how to launch, manage, and uninstall PHPStorm using different commands. Finally, we provided helpful tips to get you started with PHPStorm and maximize your productivity. Understanding these procedures can streamline your development workflow and ensure an optimized experience with PHPStorm on Ubuntu Linux.

Share to...