LinuxQuestions.org
Visit Jeremy's Blog.
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 01-11-2004, 04:48 AM   #1
sofasurfer
Member
 
Registered: Oct 2003
Posts: 110

Rep: Reputation: 15
/usr/src usage


Am I correct in understanding that the sole purpose of the /usr/src directory is for storage of downloaded and unzipped files?

I thought that anything that I added to my system should be manually placed into my user directory and that other directories were for the system to use and place things in.
 
Old 01-11-2004, 05:39 AM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
>"Am I correct in understanding that the sole purpose of the /usr/src directory is for storage of downloaded and unzipped files?"

No, just source files.

It's always up to you where to store things, of course, one of the beauties of an OS that allows you the freedom to do so. That said, most people use their home directories for experimental or personal stuff, reserving /usr/src for things installed system wide. The reason you might want your code in /usr/src is so other programs you install can find it easily. Linux kernel source is often placed in a /usr/src subdirectory so your compiler can find it if you need to compile a driver for use with your kernel.

Other times, you might want several people to be able to browse the source as a reference (or to read included source documentation), without allowing them to change it, yet avoid the CVS setup.

>"I thought that anything that I added to my system should be manually placed into my user directory and that other directories were for the system to use and place things in."

You'll want anything that's "yours" in your user (/home/yourname) directory. Everything else has varying needs. /root is for the administrator, /boot is for the kernel and associated files, /etc is configuration, etc. /usr is "shared", and generally includes stuff you want other users to be able to access.

While you yourself may not have a need for others to use anything on your system, a lot of prepackaged software will want to be installed in /usr, even though it might run just as well in your home directory. (Mozilla is a good example. The release versions want to be available to everyone and install in /usr, but the nightlies run just fine in your home directory.)

Generally speaking however, it's up to you. Put it where you prefer. On the other hand, if you want something to "play nice" with other software or be able to be seen by other software, do what the author recommends, as in the kernel source example above. If you don't particularly trust a peice of software, you can try installing it with your user account into a /home directory, and see if that works. That way, you're offered some protection if it does try to trash your system. (Most won't however, because they expect rights to kernel-related processes and software.)

For most newer users, I wouldn't worry about it too much, and just install it as recommended by the developer. That way you don't have to move it around later when something else expects it to be in a certain place.
 
  


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
/usr/src SeattleSux Linux - Newbie 3 12-23-2004 11:29 PM
/usr/src/??? iain.ross Linux - Software 5 08-24-2004 03:18 PM
/usr/src/linux? krackerroot Slackware 6 10-26-2003 03:31 PM
/usr/src ??? gibbylinks Red Hat 1 10-24-2003 04:05 AM
Creating /usr/src/linux-<xx> from kernel.<xx>.src.rpm jmourik Linux - Newbie 2 02-19-2003 04:24 PM


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

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