LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2012, 12:53 PM   #1
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 470

Rep: Reputation: Disabled
Where do I put stuff?


Basically, my problem is that I don't like installing anything single user. In fact, I don't like executibles in my home directory all together. However I'm not always sure what the best prefix for applications is.

Can somebody give me a quick reference about prefixes?

in general, I usually install non-interactive programs in the / prefix
and gui programs in /usr or /usr/local. The only time I use /opt is when it's a ported program which doesn't use a typical directory hierarchy and I just want to keep it's messy directories away from the rest of my stuff.
Also, is there any prefixes I haven't considered besides /home?
 
Old 02-06-2012, 12:56 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
It seems your filesystem is consistant, although personally I'd avoid using / for prefix, /bin and /sbin are for core tools in my mind
 
Old 02-06-2012, 01:09 PM   #3
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Assuming you are dealing with GNU/LFS, the typical one is as in

http://www.debianadmin.com/linux-dir...-overview.html
 
Old 02-06-2012, 01:10 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
My (paraphrased) understanding of the bin organization from the Filesystem Hierachy Standard:

As Cedrik said: /bin and /sbin - core executables: stuff you need to help recover in case your system cannot mount filesystems other than the root filesystem

/usr/bin and /usr/sbin - greater functionality, less necessary executables. Not considered a "safe" place for enduser-installed executables when doing a major operating system upgrade

/usr/local/bin and /usr/local/sbin - Generally the "safest" place for enduser-installed executables. Operating system/distribution upgrades should leave these directories (and any below /usr/local in general) alone.

/opt - more of a testing ground for applications and/or keeping multiple versions of the same application installed simulataneously. Enduser-installed applications should be safe here as well between major upgrades.

Of course, all the above about being "safe" for major upgrades requires that the enduser choose not to format any partition that contains the mentioned directories.
 
Old 02-06-2012, 01:44 PM   #5
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 470

Original Poster
Rep: Reputation: Disabled
Thanks for all the quick responses:

Let me clarify, that when I said a prefix of /, I did not mean I was installing executibles in the root directory, I meant in /bin and /sbin
From my limited experience installing software most "./configure --prefix" flags seem to be referring to prefixes in this way.

Anyway, based on your advice, Dark_helmet, If I wanted to install, KDE from source "I like pain ", Where would I want to put the desktop environment
I was leaning towards /usr but don't really know how to justify it over /usr/local
 
Old 02-06-2012, 01:49 PM   #6
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
Basically, anything self compiled should go into /usr/local/*.
Some software packages simply don't want to fit into something FHS-like and have their own (sub)directory structure. I put these into /opt.
 
Old 02-06-2012, 01:58 PM   #7
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You could make an argument for one of three locations:

1. /usr/bin
2. /usr/local/bin
3. /opt

Personally, since you are installing from source (part of an LFS project perhaps?), I would pick /opt first, and maybe switch to /usr once you have everything working/verified.

Here's why:
An install to /opt is more "contained" and much easier to remove (in case of mistake) than /usr: because you can simply "rm -rf" directory and start again. However, an install to /opt will require some extra steps on your part (changing PATH, LD_LIBRARY_PATH, and perhaps some other things). The reason to re-install it to /usr would only be if you want to eliminate the extra steps of special PATH configs. The install would appear "seamless" to other users (if you have anyone else using the computer).

Alternatively, you could leave it in /opt, and install subsequent KDE versions later. To switch versions, you would simply change your PATHs. Or, if you feel comfortable with symlinks, create a symlink in /opt (e.g. "/opt/kde_current") to point to the version of KDE you want to use. Gear all your config to use "/opt/kde_current" and switching versions should be as simple as switching the symlink target.

Also, I would suggest /usr over /usr/local because a GUI environment is generally considered a system-level program because it controls user-computer interaction. It's not a simple a-la-carte application install. And, if you were to install another distribution on top of this system, their KDE would likely go in /usr. So there would be some potentially hair-pulling conflicts if you installed to /usr/local and they installed to /usr.
 
Old 02-06-2012, 05:19 PM   #8
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 470

Original Poster
Rep: Reputation: Disabled
I completely agree. I was hoping the answer I got was /usr, but considering how messy of an install it is, It's probably better if I build it in opt first.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Who put all this stuff on my Desk 2 desktop? taylorkh Linux - Newbie 1 06-30-2008 06:26 PM
Put /proc and /var into a ramdisk, but other stuff on drive? mabrodis Linux - General 2 01-12-2005 08:24 PM
Where do I put stuff? ShakyJake Linux - Newbie 3 06-22-2004 07:23 PM
How much stuff have I put into burn:/// ??? Jim Miller Linux - Distributions 3 08-15-2003 09:59 AM
put stuff lacrimae Linux - Software 1 03-04-2002 05:54 PM


All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration