Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-14-2003, 10:42 AM   #1
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Where to put files?

Being a Linux novice - one aspect of Linux that has always confused me is the issue of where to put files.

I have read various articles on the root file system and what each directory is for but none of them give any guidlines as to where files should be stored. e.g:

Apache htdocs and other virtual host directories.
Directories for all users to put files e.g a public directory
Configuration files other than a programs default location.

What I want to know is, is there a specific place I should put these files. At the moment they are scattered all over the place. Even worse on different partitions. Ideally I would like all configuration files and documents on the same partition.

Any one got any ideas?
Old 12-14-2003, 10:55 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 245Reputation: 245Reputation: 245
Configuration files go int /etc
Installed apps/packages usually will reside in /usr where also most of your libs will be installed
/var holds log files
/tmp holds temporary files of course
/sbin is usually commands for root only
/bin is system type commands
/opt is usually an optional directory where kde and gnome will install misc packages/programs
/home is of course where users will put their own files

Everything else is up to you really. Its good to keep the default configuration after the initial install though, you start moving things around, your going to start breaking links, paths to commands/programs, etc.

Like by default, most packages you install either by RPM or by source will install to /usr/bin or /usr/local/bin and place the lib's to /usr/lib or /usr/local/lib

Its usually a good idea to keep this format as most users paths include where these programs install to.

Never touch /dev or /proc or don't move them around unless you want to reinstall your system. /proc is a pseudo filesystem anyways, it only exists when your system is running. /dev is the directory that links to all your hardware devices, etc.

But basically you have full control though, you can do whatever you want with new files downloaded, installed, etc. That's really up to you but I would stick to standard unless you want to do alot of extra work when adding packages, etc.

And of course regular files like just text files and media files can go anywhere you want.
Old 12-14-2003, 11:26 AM   #3
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,878

Rep: Reputation: 88
Creating a directory with links to all the files you feel should be there should accomplish what you want without breaking your system by putting system files in unknown (to the various Linux programs) non-standard places.
Check "man ln".

<caution>Is there a reason this would not work?</caution>


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
where does peng put its files? TheOneAndOnlySM Linux - Software 2 10-18-2005 09:05 PM
Where do you put your files? dbc001 Linux - General 7 02-23-2004 10:04 AM
Where does slack put the temps files?? little_ball Slackware 8 02-17-2004 10:31 AM
Where do I put my text files rewtem General 4 03-27-2003 08:38 AM
*.h files....where to put them for #include centr0 Programming 7 03-13-2003 06:26 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:56 PM.

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