The póster for your bedroom
Linux Folder Structures
Moderator: Forum moderators
- pp4mnklinux
- Posts: 1139
- Joined: Wed Aug 19, 2020 5:43 pm
- Has thanked: 637 times
- Been thanked: 285 times
- bigpup
- Moderator
- Posts: 7001
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 915 times
- Been thanked: 1531 times
Re: Linux Folder Structures
That is OK as a general Linux file system.
BUT it is not the specific file system Puppy Linux uses.
Puppy Linux is slightly different and has some different directories.
.
.
.
.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
Re: Linux Folder Structures
Thanks for providing the Puppy-specific info. But does anyone know of a more verbose description of what is supposed to be in those Puppy directories, or at least for other main Linux distros?
For instance, the file "bootinit.log" that is written to the active filesystem contains a line "Using /mnt/dev_save/xenialpupinitmodules.txt". But "/dev_save/" is not found in "/mnt/", but is actually in "/initrd/mnt/".
The file "xenialpupinitmodules.txt" (I am using Xenialpup 7.5) contains the text "kernel/drivers/usb/host/ohci-pci.ko". But your screenshot has no "/kernel/", and there is no "/initrd/kernel/". There is a "/sys/kernel/" but that folder has no "/drivers/". (A search finds that the intended "/kernel/" is "/lib/modules/4.4.95/kernel/".)
There must be a logical organization to this.
Re: Linux Folder Structures
@ OldAcer
Does this help
Best regards
Chelsea80
Edit: Sorry I should have given credit to thegeekstuff.com for the info.
I re-formatted it for my own use.
Chelsea80
1. BionicPup32+28 19.03 - Linux 4.9.163 - lxpup - 32-pae [i686] - (UPup Bionic Beaver)
....Frugal Install - Internal HDD - Gateway MX8716b - HDD 120GB - RAM 2GB
2. Friendly-Bionic32 v1.1
....USB Stick 2GB
- mikeslr
- Posts: 2968
- Joined: Mon Jul 13, 2020 11:08 pm
- Has thanked: 179 times
- Been thanked: 924 times
Re: Linux Folder Structures
The Graphic is 'read-from' left-to-right. The left-most part shows everything 'hanging-from' the root (/) of the file-system. The part to its Right shows what 'hangs-from' root (~). In Puppys the /root folder is one's home-folder, analogous to Documents and Settings under Windows. Parts further to the right indicated by a point of the line show the contents of folders 'hanging' from the folder at the beginning of that line.
Notes about the above:
As OldAcer's post indicates the Top level folder 'mnt' is actually the representation of a short-cut/symbolic-link to /initrd/mnt/. But as /mnt/ is so important a location running Puppys in almost all circumstances it's just easier to think of it as a 'real location'. Except for the following, files and folders 'hanging' from /mnt are the ONLY files not copied into RAM on boot-up; and as ram is cleared on shutdown, the only location where files you create will survive a shutdown/reboot unless by executing a Save you modify your SaveFile/Folder to hold a copy of such files.
The part of the graphic at the Top-Right shows a folder holding a somewhat typical Puppy folder: its READ-ONLY files-systems and its READ-WRITE SaveFile. On boot-up, the former are copied into RAM and the latter mounted directly in /initrd.
The exception is that many Linux versions --and some recent Puppys-- provide a top-level folder named 'media' --not shown in the graphic-- which serves the same purpose; and AFAIK is also just a symlink to /initrd/media.
Not shown in the graphic is another important folder which is unique to Puppys: /root/my-applications. It contains two folders /root/my-applications/bin which is 'on the path'. Linux systems will only search for executables 'on the path'. That makes /root/my-applications/bin a convenient location to place executables unique to Puppy. And /root/my-applications/lib a possible location for placing libraries when attempting to 'work-around' the 'usr-merge' rule.
Not shown are folders 'hanging' from the Top-level /usr folder. It will contain both bin and lib folders and a folder named /local. That /local folder will also contain lib and bin folders but also the Apps folder where many rox-apps are located.
Two other things to keep in mind. Until the 64-bit operating systems became prevalent there was no need for lib64 folders: to hold 64-bit binaries and libraries in order to distinguish them from identically named 32-bit versions. When it was decided to add such folders Slackware chose to name them lib64. Debian and Ubuntu --for reasons beyond me-- chose to name them /x86_64-linux-gnu. So where on the graphic you see a lib64 folder, under a debian/ubuntu system it would be named /x86_64-linux-gnu. And there might be such folders at the top level, hanging from /usr and hanging from /usr/local.
Puppys can be woofed from both Slackware or debian/Ubuntu. And applications created for one can sometimes be run under Puppys woofed from the other. So, depending on your Puppy and the applications you installed, that Puppy might have both /lib64 and /x86_64-linux-gnu folders. To facilitate its 'devil may care' approach to construction of the file-system and applications which run under it, Puppys have developed several diagnostic tools. One is pfind: plug in a name and pfind will find and display a list of all* files containing that name spelling out the location where it will be found. The other is ListDD. Run LIstDD on a binary and it will display the location of every file it makes use of, but also a list of what files it needs but could not find on the system-in-RAM.
The 'usr-merge' Rule was recently adopted by a Linux less tolerant than Puppy to diversity. It restricts the use of top-level /bin and /lib folders to the creators of a distro. 'Mere' users must locate binaries and libraries in /usr.
-=-=-=-=-=-
* Puppys woofed from debian/Ubuntu have never been able to locate files in folders named /x86_64-linux-gnu. In order to make use of applications containing such folders the contents of such folders have had to be moved to /lib folders and a symlink to such /lib folder named /x86_64-linux-gnu created.
Re: Linux Folder Structures
Thanks to Chelsea80 for that pdf which was very useful. I am still ingesting the info from
Mikeslr. What app produced that two-pane window Structure1.jpg? I looked at ROX-filer info but didn't see a 'view' option.
And how does one spot a Symbolic link? Desktop items, which are obviously links, when right-clicked for Properties, unlike with Windows, show the properties of the target item, not the desktop item. He said "Top level folder 'mnt' is actually the representation of a short-cut/symbolic-link to /initrd/mnt/" but properties of that is shown as inode/directory, whereas top level 'tmp' is labeled Link, and properties shown as Symoblic link and the target listed.
- mikeslr
- Posts: 2968
- Joined: Mon Jul 13, 2020 11:08 pm
- Has thanked: 179 times
- Been thanked: 924 times
Re: Linux Folder Structures
OldAcer wrote: Thu Apr 13, 2023 1:30 amThanks to Chelsea80 for that pdf which was very useful. I am still ingesting the info from
Mikeslr. What app produced that two-pane window Structure1.jpg? I looked at ROX-filer info but didn't see a 'view' option.And how does one spot a Symbolic link? Desktop items, which are obviously links, when right-clicked for Properties, unlike with Windows, show the properties of the target item, not the desktop item. He said "Top level folder 'mnt' is actually the representation of a short-cut/symbolic-link to /initrd/mnt/" but properties of that is shown as inode/directory, whereas top level 'tmp' is labeled Link, and properties shown as Symoblic link and the target listed.
The two-pane plus tree view is an option of xfe (NOT xfce). It's a very small application available via PPM under AFAIK all Puppys. PPM will also offer some themes. Wizard has provided a very useful addon. https://www.forum.puppylinux.com/viewto ... 989#p79989. While I've become accustomed to rox and its quirks, xfe does offer some handy features.
TBH, how /mnt is handled is I suspect one of the mysteries of initrd above my pay-grade. I only know by visually examining /initrd/mnt that dev_save (/mnt/home's alternate name) is mounted there, as are the 'alphabet' drives.
If you file-browse to /inti/mnt/ and click it you will find yourself looking at /mnt/home.
The above graphic also shows that under both rox and xfe symbolic links are visually distinguishable from other files/folders by a 'unique-to-them' icon. Note spot's icon. How that's accomplished is, again, above my pay-grade.
Desktop icons are a unique case, somehow displayed by rox's handling of the 'pinboard'.
- bigpup
- Moderator
- Posts: 7001
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 915 times
- Been thanked: 1531 times
Re: Linux Folder Structures
This is another topic on the subject of Puppy Linux filesystem layout:
viewtopic.php?t=180
Keep in mind the first post got corrected based on info in other posts.
So reading some of the other posts.
You have to consider they are about the original first post, before it got corrected.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected