Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Some packages, like Adobe Reader and NetBeans, allow installation to /opt folder for global use. However, what should I do to install regular applications to the /opt folder?

Do I have an option to install applications in any folder I want like Windows?

share|improve this question
You can usually choose where to install by using the --prefix option with ./configure. As a rules of thumb though: Files needed for booting go in /bin and /sbin. Files from the distribution go in /usr/bin and /usr/sbin. User maintained files go in /usr/local or /opt. –  Hennes Apr 7 '13 at 10:59
What is the reason for preferring /opt for applications that don't normally install there? –  user25656 Apr 7 '13 at 11:04
vasa see if this helps. –  Salem Apr 7 '13 at 11:27
@Salem, thanks for the link. But I just felt that OP isn't being clear about what is intended and why. –  user25656 Apr 7 '13 at 11:45
An application that spreads its different components between /usr/lib /usr/bin /etc and other such folders are still "global". They can be run from any account. /opt is for large "optional" desktop applications. When installing from the software centre the package chooses where to go, and it may not work if you move it, what is the purpose of putting the package in /opt anyway? –  handuel Apr 7 '13 at 12:05

1 Answer 1

up vote 0 down vote accepted

It depends on how the software is packaged.

  • If your software comes with an installer it may let you select where you want to install them;
  • If you are building your software from source, usually you can also select where it will be placed (with --prefix and DESTDIR for configure/make);
  • If you are installing your software from .debs (ie apt-get) you can't choose that. They use / as the "base path".

Regarding the last statement, please note that a .deb is basically a compressed archive with a tree structure similar to the one the package will have when installed, so you can extract them and place whenever you want. But this may or may not work well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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