5

As a developer, I've often downloaded and run

./configure
./make
./make install

to install apps onto my Linux system. But I've never been quite clear on the best place to keep the downloaded directory. My local Desktop is the default location, but I'd like to know what the best "official" place to keep it is. Also, does it vary by distro?

I'm running Ubuntu for now. I know apt-get install can do this for you, but sometimes the app I'm interested in simply isn't available on those lists.

vrwim
  • 13,020
  • 13
  • 63
  • 118
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213

5 Answers5

18

Take a look at the FileSystem Hierarchy Standard: it's /usr/local/src. However, this is a contentious issue as you will find here.

dirkgently
  • 108,024
  • 16
  • 131
  • 187
11

Perhaps "/usr/local/src" ? ;-)

Steel Plume
  • 2,260
  • 3
  • 26
  • 35
3

If you use a package manager, allow it to use the default for managed packages. If you administer the box, put unmanaged third party tools under /usr/local as Steel Plume suggests (though there are some who prefer /opt). If installing as a unprivileged user, unpack and compile in $(HOME)/src, and install into $(HOME)/bin, $(HOME)/etc, and so on.

Community
  • 1
  • 1
dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
  • I asked this question a couple of years ago on some other forum when developing a Python app on a Linux box. I knew about the standard linked to by dirkgently, but I went with /opt. Nobody communicated to me that this was necessarily a bad idea. – Dexygen Apr 12 '09 at 15:21
  • I wouldn't call it bad. Just unusual. The best argument *for* /opt that I know, it that it can be mounted without first mounting /usr. This is a small but real bonus. However, /usr/local has a *long* history. – dmckee --- ex-moderator kitten Apr 12 '09 at 15:28
2

for personal use: ~/src

for sharing across a system: /usr/local/src

0

@dirkgently and @dmckee are completely spot on. I would add that since it is can be a contentious issue, I would mimic what the distribution provider (in your case) Ubuntu does for its major packages.

thisjustin
  • 280
  • 1
  • 3
  • 18