LinuxQuestions.org
Review your favorite Linux distribution.
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 11-28-2007, 06:32 PM   #1
Couling
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
what are the standard program directories under linux?


I'm a windows user starting all over again as a linux newby.

Linux seems to have 3 directories for program files:
/bin
/usr/bin
/usr/local/bin

(along with equivalent /lib directories)

I'm a bit confused by what to put where.
Can someone explain the difference in use between these directories.
I'd like to know that I'm putting things in the right place.

Alternatively does anyone know a good resource for directory info like this?

Thanks.
 
Old 11-28-2007, 06:59 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
http://tldp.org/LDP/Linux-Filesystem...tml/index.html

There's also /sbin, /usr/sbin, and maybe /usr/local/sbin (not in front of my box to check). Also, when I compile a program from source code, I usually install it to /opt.
 
Old 11-28-2007, 07:07 PM   #3
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
Try this link.

http://www.tuxfiles.org/linuxhelp/linuxdir.html

But in general, if you install a package it will put files in the appropriate directories, and you have little control of where stuff goes. For you personal programs, keep it local somewhere in "/home/your_name/my_programs", and add this directory to the path in ~/.bash_profile.
 
Old 11-28-2007, 07:14 PM   #4
Couling
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rsashok View Post
For you personal programs, keep it local somewhere in "/home/your_name/my_programs", and add this directory to the path in ~/.bash_profile.
I'll keep t his in mind although I'm installing linux on my laptop, so I find "personal" programs a little hard to define.

Thanks for the links and thanks for your time
 
Old 11-28-2007, 08:15 PM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Another good article is available at pathname.com/fhs.
 
Old 11-29-2007, 06:06 AM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by Couling View Post
I'm a bit confused by what to put where.
Can someone explain the difference in use between these directories.
I'd like to know that I'm putting things in the right place....
You have received other answers to the question that you have asked, but I'm a little concerned about why you are asking it. If it is for general information, that can only be encouraged, but...

As a relative neophyte, you should be using a distro which makes things easier for you. In my opinion, all of those use a package manager of some kind. There is a bit of a split between the .deb system (Debian and a whole host of derivatives such as the *buntus, Mepis etc) and .rpm system (RedHat, SuSE, Mandriva and derivatives) and a few less popular ones but, the installer/updater system that works with the packages takes care of where you put the program, what libraries it needs and where those libraries need to go.

(The exception to all of this is Slackware and derivatives, and I wouldn't really describe Slackware as a newbie-friendly distro. Has its virtues and has its adherents, of course, but its 'do-it-yourself' style does not make the learning curve any easier for newbies. But, if it happens that you are convinced that Slackware or a derivative is the only thing for you, I'm sure you'll find how-tos and tutorials for your favourite distro which will include exactly these points.)

So, support your local package manger and use locate and/or find if you need to discover where it has put stuff (for general interest). Otherwise, it should just happen.
 
Old 11-30-2007, 06:29 PM   #7
Couling
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Yes in the various live cds I've tried I've noticed some big differences in the layout.

In general I was asking becuase I'm insterrested in programming and (at some point) will be looking to write some stuff for linux.

For now tho, it wasa general point of interest rather than an intent to relocate every package.

Thanks for the advice.
 
  


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
Standard openGL program does not run on linux rdg2 Linux - Software 0 07-06-2007 04:15 AM
General Question - Non-Standard Directories shevegen Linux From Scratch 1 03-18-2006 07:19 AM
Standard Input in Perl Program eachow Linux - General 2 11-17-2005 12:16 AM
how to redirecting the standard output in program phil123 Linux - General 3 02-23-2004 12:02 AM
Seperate program directories in Linux NGraphiX Linux - General 7 09-17-2002 07:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 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
Open Source Consulting | Domain Registration