LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Where to put files? (https://www.linuxquestions.org/questions/linux-general-1/where-to-put-files-125738/)

codedv 12-14-2003 10:42 AM

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?

trickykid 12-14-2003 10:55 AM

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.

2damncommon 12-14-2003 11:26 AM

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>


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