Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Where is a good place to store programs? Example: I downloaded, and compiled from source, both Allegro-4.2.2 game dev for C++, and Python 2.6, but they're stored in the /home folder. Is that a good place to store files? I don't think it's good to mix that up with basic things such as music, pictures, or videos, is it?
More generally, take a look at the FHS (http://www.pathname.com/fhs/), which describes what each of the different directories in a Linux system are supposed to be for.
Generally speaking, software that is installed on the local system, that is not to be modified by the package manager, “should” go into /usr/local/ (using /usr/local/bin for binary executables, /usr/local/etc for configuration etc).
Of course, you're free to do what you like with your own computer; the FHS is intended reading for distribution maintainers rather than system administrators. Personally, I find it easiest to try and follow it, rather than making up my own arbitrary system; that way, if another person has to maintain the same computer then they should have some idea of where to find things.
When you say "they're stored in the /home folder", do you mean the actual binaries or the source files? If you mean the source directories themselves, I usually save those in a separate folder in my $HOME, which I call - boringly enough - sources. If you didn't do anything fancy to the programs you compiled, then you probably installed them to /usr/local which is the default choice for many (most?) programs.
This is what I meant by asking if you meant the sources or the binaries. The items in /usr/local/bin are the binaries. They are the compiled and installed programs that you made. The folder in your /home directory is the original sources folder. You can throw it away, but I prefer to create a directory (called sources) and store the source folders there. Sometimes you need to patch and recompile a program, and sometimes you want to uninstall it and the sources may include a make uninstall target. So, just as a thought, you might create a backup folder and move the sources there.
Look at "./configure --help". The "make install" phase will install the files under a base directory. Usually /usr/ or /usr/local. There is an option to change this. Here is an example from grub:
--prefix=PREFIX install architecture-independent files in PREFIX
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
/usr/local/ is the hierarchy for packages you install yourself. If you are compiling a source package that your distro supplies, /usr/ may be the default. /usr/local/ will not be disturbed during a distro upgrade.
If you use /usr/local/ as the prefix, then make sure that /usr/local/bin/ is in your $PATH and /usr/local/sbin/ is in root's path.
Also add /usr/local/lib/ to /etc/ld.so.conf, if it isn't already. Then run "sudo /sbin/ldconfig". This makes sure that libraries installed can be found as well.