This question has already been answered:

I downloaded ide phpstorm, I launch it by going to the downloads/phpstorm/bin/phpstorm.sh command ./phpstorm.sh . How to make it possible to run phpstorm as a global program just by typing ./phpstorm in the terminal and no matter what directory I am in?

Reported as a duplicate by members of aleksandr barakin , jfs , Community Spirit 10 Oct '16 at 8:17 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • And what prevents to make a shortcut to run on the desktop / panel, etc.? - PinkTux
  • one
    globally starts all of the directories listed in the PATH environment variable. either put your script in one of these directories (for example, / usr / local / bin) or add your directory to the PATH (see /etc/env.d or something like that, on different systems the initial environment is formed differently). In this case, at startup, you will just have to write phpstorm.sh without ./ meaning starting from the current directory. And yes, to launch a command without .sh there should be no script at all - Mike
  • @Mike, for example / usr / local / bin - ~/bin for this exists (unless, of course, there is a task to make all the users of this machine happy). - PinkTux
  • @PinkTux may be in ubuntu ~ / bin in the paths, but in the systems available to me there is no such thing. - Mike
  • @Mike, in ubunthoid add ~/bin (if such a directory exists) in PATH is written out of the box either in ~/.profile or ~/.bashrc . - PinkTux

1 answer 1

 export PATH=$PATH:/pathToPhpstorm.sh 

you can run from anywhere phpstorm.sh . can be added to .bash_profile or .bashrc .