Skip to content

Instantly share code, notes, and snippets.

@dipenparmar12
Last active January 8, 2024 10:13
Show Gist options
  • Save dipenparmar12/8754e80da6842f3656cc40b7579481a9 to your computer and use it in GitHub Desktop.
Save dipenparmar12/8754e80da6842f3656cc40b7579481a9 to your computer and use it in GitHub Desktop.
How to install phpstrom in Linux os

How to install PhpStorm on Linux

Video Tutorial

1. PhpStorm Download Link

Extract .tar.gz Files using Linux Command Line ...

sudo tar -xvzf PhpStorm-2020.*.*.tar.gz

Give full permission to PhpStorm folder (optional)

sudo chmod -R 777 PhpStorm-20**.**

2. Create searchable icon

Next step is to Create PhpStorm.desktop file in ~/.local/share/applications/ path

  • Goto path

    cd ~/.local/share/applications/

  • Create file

    sudo touch PhpStorm.desktop

  • Modify file using nano editor

    sudo nano ~/.local/share/applications/PhpStorm.desktop

  • Add the following contents in the file:

    This works in Unity and GNOME desktop environments.

    For Linux Ubuntu

    [Desktop Entry]
    Version=1.0
    Name=PhpStorm
    Comment=PhpStorm Desktop
    Exec=<path-to-PhpStorm-executable>
    Path=<path-to-PhpStorm-executable-directory>
    Icon=<path-to-PhpStorm-logo>
    Terminal=false
    Type=Application
    Categories=Development;
    

    For Linux Mint

    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=PhpStorm
    Exec=<path-to-PhpStorm-executable>
    Path=<path-to-PhpStorm-executable-directory>
    Icon=<path-to-PhpStorm-logo>
    StartupNotify=false
    StartupWMClass=PhpStorm
    OnlyShowIn=Unity;GNOME;
    X-UnityGenerated=true
    
  • To save changes Ctrl+x, y, Enter after editing to save

  • Validates a desktop file and prints warnings/errors for PhpStorm.desktop

    desktop-file-validate PhpStorm.desktop

  • If we don't get PhpStorm Icon in Show applications run following command

    sudo update-desktop-database

3. About PhpStorm

PhpStorm is a commercial, cross-platform IDE for PHP, built by the Czech Republic-based company JetBrains. PhpStorm provides an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code.

@westonruter
Copy link

westonruter commented Mar 13, 2023

It doesn't seem the "Create searchable icon" step is necessary anymore, at least not such a manual method. When first launching PhpStorm in the "Welcome to PhpStorm" window, in the lower left corner there is a ⚙️ icon. Clicking it opens a menu including an option "Create Desktop Entry...". This will add PhpStorm to the list of applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment