What is the "/usr/local/src" folder meant for?
According to Linux FHS, /usr
is the location where Distribution-based items are placed and /usr/local
is the location where you'd place your own localized changes (/usr/local
will be empty after a base install). So, for example, if you wanted to recompile an Ubuntu package from source, their package manager would place the source for package in /usr/src/{package dir}
. If you downloaded a program not managed by your distribution and wanted to compile/install it, FHS dictates that you do that in /usr/local/src
.
EDIT: Short answer, yes, put your code in /usr/local/src
.
It depends on what you're doing with that source. If it's for reference, yes, that's a good place. /usr/local
is reserved for software installed locally by the sysadmin. So, if you want to install software along with source files (for other programs to use or for people to look at), that's good.
It's not meant, however, to be a workspace. Since it is local, you can do whatever you want, of course, but this isn't designed to be the place to put your software development tree.
That should, really, be in a code repository (possibly in /srv/sourcerepo
or something), and then developers would check out their own working copies into their home directories.