LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-24-2018, 04:40 PM   #1
saeed7r
LQ Newbie
 
Registered: May 2018
Posts: 7

Rep: Reputation: Disabled
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?
 
Old 05-24-2018, 04:50 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
The idea is to share globally functions and resources for programs (functions from libs, images from graphics files, text, anything that can be accessed)
 
Old 05-24-2018, 05:10 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.
 
Old 05-24-2018, 08:37 PM   #4
adps8
LQ Newbie
 
Registered: May 2018
Location: Completetely lost
Distribution: pureOS, Debian, Raspbian
Posts: 5

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 05-24-2018, 09:16 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
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.

Last edited by frankbell; 05-24-2018 at 09:21 PM.
 
1 members found this post helpful.
Old 05-24-2018, 11:50 PM   #6
saeed7r
LQ Newbie
 
Registered: May 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
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.
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?
 
Old 05-25-2018, 08:55 AM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 09:18 AM
Linux file structure go_sooner Linux - Newbie 3 06-05-2005 01:46 AM
Linux/Unix file structure and more WarrenWright Linux - Newbie 4 02-07-2004 04:28 AM
linux file structure alzogbi Linux - Newbie 5 01-02-2004 03:31 AM
File structure of Linux TDEE Linux - Software 6 02-26-2003 11:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration