GNU-Linux File Structure
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:
|
This is a good introduction to the Linux file structure: https://www.howtogeek.com/117435/htg...ure-explained/
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. |
Quote:
|
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:
Code:
dpkg-query --listfiles package_name |
All times are GMT -5. The time now is 09:14 PM. |