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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This may come off as kind of a silly question, but I'm relatively new to Linux, in that I've used it and installed different distros before but havent really done much more than the basics. Anyways, I've downloaded and unpacked mozilla firefox, but im not sure where I should install it to. Is there some kind of convention i should follow (I was thinking of putting it in /user/bin), or is it pretty much just where ever i choose. Just curious for anyone's general input.
I'd put it in /opt. Just my choice...although /usr/bin would be the most logical and often the unconscious choice (in case you install a package). Only thing you would want to make sure is that you have the path set to the directory.
not a silly question at all !
yea /opt/<package>
feels good
firefox can fit the /opt standard of having it's own directory structure <package>{bin,include,lib,share}
plus firefox still has this terrible thing where it has a directory ./lib/mozilla
and the tool ./bin/mozilla-config and a pkgconfig directory with the same .pc file names as mozilla files
and the ./include directory is mozilla
so it's a real mistake to put it in /usr or /usr/local if that's what you did with mozilla.
untill they change this stuff one one the other or both need to be in /opt
Personally, I like having pretty much everything I install go into /usr/local/bin. No real rhyme or reason behind it, I just like it :P
But, the benefit of this is, I always know where everything is. As long as it works for you, and doesn't turn your system into an unusable piece of computer components, put it wherever you feel like
I put firefox in /usr/lib coz thats where mozilla is and then I make a symlink (ln -s /usr/lib/firefox/firefox /usr/bin/firefox) so that I can run it without typing in the full path.
In my "Installation Concepts" thread, below I also got a wide range of answers to this exact same question - I was also installing Mozilla Firefox.
So could someone here please explain to us hapless newbies if Linux has any accepted conventions about what directories and directory trees are used for WHAT?
Linux isn't structured like Windows is, with two very clear locations for everything to go in: My Documents, Program Files.
The directory tree has different purposes intended behind each of the items, but they are not necessarily used for that any longer.
/boot
This is where things that happen at boot go.
/etc
This is where lots of configuration files for the entire operating system go.
/var
This is where a lot of changing files are put - especially system logs or copies of installed packages.
/home
This is usually where user's "My Documents" as well as "Documents and Settings" from Windows goes.
/usr
This *used to be* what /home is becoming today. These days, /usr is where source code, programs, and other stuff goes. Popular destinations include: /usr/local (programs for only this box) /usr/src (source code for installed programs). /usr/bin - tons of extras for the command line, libraries, and stuff go here. /usr/bin ends up being the dumping ground for tons of symlinks (Shortcuts) to installed software binaries and launcher shell scripts because it is always in the $PATH) /usr/lib - confusing isn't it - this one has more libraries and programs installed in it.
/bin
Command line programs
/sbin
Command line programs for the root usr
/mnt
Directories where other file systems, such as floppies, CDROMs, DVD players, remote systems, and your windows partitions are "mounted." You can browse them directly from here.
Where can you install software? Anywhere. That's one of the powerful things about Linux - and also one of it's annoyances. You are allowed to totally administrate your system, but at the same time, you are allowed to create one hell of a mess.
Unfortunately, modern distros come packed with stuff that you don't know what it is, and I have to say, the installation points for much of this pre-installed software are inconsistent to say the least. You can move things around if you like. That would definitely be a learning experience. Try using the mv command on your firefox browser directory, whereever you put it, and move it to another place. The symlink should still point to it after the move, and as long as you have a link to the launcher shell script or binary in a directory in your $PATH, then you can put it anywhere you like.
However, there are some exceptions:
* Those dot directories in your /home need to stay where they are. They are configurations particular to that user, and their location is part of what makes them work.
* I wouldn't move anything out of /boot, /etc, or /var, because the system is probably hard-coded to find things there.
* Limit your pruning and moving to *installed software* like web browsers and the like. Be careful to respect directory structure and not think you can move /mozilla/bin to one place and /mozilla/plugins to another and still have it work. The top level must keep everything under it for a successful move.
ALWAYS KEEP A JOURNAL of things you change in your system so you can repair or put it back more easily a month from now when you discover what a horrible mistake you have made.
ALWAYS BACK UP so you can just blow everything away and reinstall - this leaves you free to break your system and learn.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.