I am having a hard time finding out how to install programs in Ubuntu in the right location. If I use Ubuntu Software Center to install a program that gets installed in its right place, but when I download a program manually in this case PhpStorm it went to the Downloads folder and when I ran the command


I assumed it would get installed in the directory where it is supposed to go.

After I ran the command phpstorm kicked off, I did the work I needed to do, and before shutting off the computer I thought of cleaning the Downloads folder. After deleting the phpstorm folder there I could no longer use the phpstorm shortcut I created.

So after restoring the deleted files, how do I move phpstorm to its right location? In future how do I make sure applications are installed to the right places?


What ways are there to install software in Ubuntu?

There are many different ways software is installed on Linux. The preferred method is using the official repositories using apt or the Software Center. However, some programs are not available there, so you can add other repositories using PPAs. This will add "unofficial" packages to the repositories used by APT and the Software Center.

Some software is not available in PPAs either, but there are installers available, like on Windows. These installers can be shell scripts, .RUN files or other things. You can install these programs by running the installer just like you would do on Windows.

Some software is available as "ready to run" archives. You just extract it and run it. No installation. For those programs, you have to provide a .desktop file yourself, and you have to put them in a "safe" folder.

How do I install this program?

This program seems to be of the last type. I would recommend to put it in its own subfolder in the /opt folder. /opt/PhpStorm-139.732

Via graphical interface

One of the easiest ways to do this is using nautilus (the file manager), but you need root privileges to change things in the /opt/ folder. You can start nautilus as root by running sudo -H nautilus in a terminal. BE CAREFUL! You can do dangerous things running nautilus as root.

Via command line

Move the folder from downloads to /opt/

sudo mv /home/shairyar/Downloads/PhpStorm-139.732/ /opt/PhpStorm-139.732/

After that, you can check if it is moved by running ls on the directory. This lists the contents of the directory

ls /opt/PhpStorm-139.732/

Create a launcher icon

You can find more information on how to create a launcher icon here: How can I create launcher icon for PhpStorm?

  • thanks but what command do i use to move the downloaded directly to /opt/, i am really new at ubuntu and getting used to the commands – Baig Dec 30 '14 at 16:16
  • 2
    Thank you so much, your answer is exactly what i was looking for, thanks for getting me introduced to nautilus and sharing the command to move. I really really appreciate it – Baig Dec 30 '14 at 16:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.