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.
Linux File structure is kind of up side down instead of programs and libraries be in a folder with their names on it and in them have lib var ... folder there are global var lib ... folders and program distribute their files inside of it. this confuses me how can I find files for my programs through all of these sym-linkes generated by installing system(apt for me) and how do know what libraries are linked automatically by compiler?
The idea is to share globally functions and resources for programs (functions from libs, images from graphics files, text, anything that can be accessed)
I kind of agree with you on this subject. It could be rather trivial to have installers perform a task like you wish but there is little technical side support for it.
Things like Snaps are an idea that may win over but there is competition on every change.
Hi, I'm new on the forum so, and not so old on GNU/Linux world, sorry for any inconvenience. Well, as keefaz says, the idea is to share functions, so Linux and other UNIX like systems do almost the same. In my opinion all you have to do is understand the The Filesystem Hierarchy Standard (FHS), understand what's the general purpose of the directories and so on.
For this:
Quote:
(...)and how do know what libraries are linked automatically by compiler?
linuxubuntu saeed7r is online now Report This Post(...)
I suggest you read the documentation of your software and try to understand what they're doing. And of course, participate on theses forums to clarify the things.
The underlying philosophy is that like files are stored in similar locations. Hence, executables are in /bin or /usr/bin. Libraries (similar to DLLs in Windows world) are in "lib" and "share" directories, depending on their function. And so on.
There is also history. Unix--and Linux was written to Unix standards--has been around for a long time. When hard drives were very small, Unix could be configured so that different directories could be on physically separate hard drives. That's one reason /bin (generally executables required for booting and administration) is separate from /usr/bin (executables expected to be used by users).
Frankly, once I got used to it, I concluded that the Linux file structure is more rational than the DOS/Windows file structure.
That's one reason I'm not all fired up about things like snaps. They seem to be a good example of "if it ain't broke, fix it."
The underlying philosophy is that like files are stored in similar locations. Hence, executables are in /bin or /usr/bin. Libraries (similar to DLLs in Windows world) are in "lib" and "share" directories, depending on their function. And so on.
There is also history. Unix--and Linux was written to Unix standards--has been around for a long time. When hard drives were very small, Unix could be configured so that different directories could be on physically separate hard drives. That's one reason /bin (generally executables required for booting and administration) is separate from /usr/bin (executables expected to be used by users).
Frankly, once I got used to it, I concluded that the Linux file structure is more rational than the DOS/Windows file structure.
That's one reason I'm not all fired up about things like snaps. They seem to be a good example of "if it ain't broke, fix it."
But that's just me.
Your answer makes very good sense to me was there any standard documentation that could've read so I wouldn't ask this thread, like posix? or did you came to this all by experience?
In case it may answer at least a part of your question ("how can I find files for my programs"), on a dpkg-based system you can determine which files are installed by a certain package with the following command:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.