[FAQ] Linux File System Overview


Recommended Posts

  • 4 weeks later...
  • 1 month later...

Very interesting read, I've read the whole of Page 1 (slowly getting through Page 2). But I've been looking for this sort of guide to help me learn more about the folder...I mean, Directory Structure. I seriously did not know that a 'Folder' and a 'Directory' are two different things, but have the same result.

Directory = Physical (Think Command Line)

Folder = Graphical Representation of a Directory

Ext3 = /boot

Reiser3/FS = /root

What about a SWAP partition? Since we're on file structures, I'm confused about the following:

Why does Linux need 3 partitions to install Fedora Core or Gentoo when Windows only needs 1 partition?

/boot (+32M)

/swap (+512M)

/root (remaining space)

My incorrect theory (so please correct me):

- The kernel is stored in /boot as a compressed 2-4MB file.

- The reason it's stored here is because when you turn your system on, the MBR detects GRUB and loads up the kernel here as opposed to /root for file protection???

- /boot decompresses into /swap for your session (for some reason).

- /root all your files, system files...everything (except for the kernel).

^^ You can see why I'm confused.

  DjmUK said:
Why does Linux need 3 partitions to install Fedora Core or Gentoo when Windows only needs 1 partition?

/boot (+32M)

/swap (+512M)

/root (remaining space)

585662167[/snapback]

Linux can install just fine on a single partition, if you'd prefer it that way. Here's a few reasons why most distributions have traditionally used 3 or sometimes even more partitions:

- because it facilitates easier backups and reinstalls of the OS

- with a seperate /boot partition, your kernel can be placed in there and then the partition not mounted automatically at boot so that your vital boot files aren't available to be messed around with unless you specifically mount them

- using a swap partition instead of a swap file (linux can happily handle either) again prevents silly errors like people deleting the file by mistake and so not getting any swap space available at next boot

- using multiple partitions can just make managing your system easier - for example many servers use a seperate partition for /var which is traditionally where the http documentroot is on an apache webserver and also where the mail spooler normally resides on mailservers

- many people keep their /home mounted on a seperate partition which they mount from multiple operating systems - back when I used redhat 9 alongside gentoo, I had a seperate /home dir which got mounted from both distros, so I kept the same home folder all the time

Hope that gives you some idea of why multiple partitions are normally used.

Thanks rezza, I think I understand it all, and according to your notes hopefully this would be a possible partition table (3 HDDs):

hda1 /boot (kernel storage)

hda2 /swap (still confused as to what gets stored here)

hda3 /root (operating system)

hdb1 /home (personal files)

hdb2 /var/httpd/website_pages (client's web sites)

hdc1 /var/mysql_db (mysql database server)

For a mid-size business it would be better to have this (3 PC's):

PC1 - hda1 /boot (kernel storage)

PC1 - hda2 /swap (still confused as to what gets stored here)

PC1 - hda3 /root (operating system)

PC1 - hdb1 /home (personal files)

PC2 - hda1 /var/httpd/website_pages (client's web sites)

PC3 - hda1 /var/mysql_db (mysql database server)

^ I decided to make more then three partitions and reinstall Fedora Core 3 to see what the differences were.

I have two 20GB hard drives and they are partitioned as followed:

hda1 /dev/hda1 /boot reiserfs 102MB

hda1 /dev/mapper/VolGroup00-LogVol01 / reiserfs 5.2GB

hda1 /dev/mapper/VolGroup00-LogVol03 /tmp reiserfs 5.2GB

hda1 /dev/mapper/VolGroup00-LogVol07 /opt reiserfs 5.0GB

hda1 /swap swap 1GB

hda1 none /dev/shm tmpfs 251MB

hda2 /dev/mapper/VolGroup01-LogVol04 /usr reiserfs 5.0GB

hda2 /dev/mapper/VolGroup01-LogVol06 /usr/local reiserfs 5.0GB

hda2 /dev/mapper/VolGroup01-LogVol02 /home reiserfs 5.0GB

hda2 /dev/mapper/VolGroup01-LogVol05 /var reiserfs 5.0GB

So far I haven't seen any benefit in splitting it up like this, but I don't plan on changing it anytime soon though.

  DjmUK said:

hda2 /swap (still confused as to what gets stored here)

Swap= virtual memroy= page file in windows.

  Hurmoth said:
^ I decided to make more then three partitions and reinstall Fedora Core 3 to see what the differences were.

I have two 20GB hard drives and they are partitioned as followed:

hda1 /dev/hda1 /boot reiserfs 102MB

hda1 /dev/mapper/VolGroup00-LogVol01 / reiserfs 5.2GB

hda1 /dev/mapper/VolGroup00-LogVol03 /tmp reiserfs 5.2GB

hda1 /dev/mapper/VolGroup00-LogVol07 /opt reiserfs 5.0GB

hda1 /swap swap 1GB

hda1 none /dev/shm tmpfs 251MB

hda2 /dev/mapper/VolGroup01-LogVol04 /usr reiserfs 5.0GB

hda2 /dev/mapper/VolGroup01-LogVol06 /usr/local reiserfs 5.0GB

hda2 /dev/mapper/VolGroup01-LogVol02 /home reiserfs 5.0GB

hda2 /dev/mapper/VolGroup01-LogVol05 /var reiserfs 5.0GB

So far I haven't seen any benefit in splitting it up like this, but I don't plan on changing it anytime soon though.

585667869[/snapback]

Why all reiserfs? Ext3 seems to have better compatibility on Ubuntu.

  jack_canada said:
Why all reiserfs? Ext3 seems to have better compatibility on Ubuntu.

585667950[/snapback]

I was just playing around... I might switch them later on to see if there are any differences, but I'm satisfied with reiserfs right now.

  • 6 months later...

I have a doubt!

In windows there is a folder named "Program Files" In which by defauly all the files go into.. :sleep:

In linux for example, if I get a .bzip or .tar file I usually extract it to /opt folder and do a ./configure, make, make install. Actually In which folder in Linux is it **RECOMMENDED** to extract and Install? :blink:

---------------------------------------------------------------

Naveen Chandran

http:\\naveenchandran.blogspot.com

^^^ Only some of the stuff goes into "Program Files". There are .dlls and registry entries and so forth.

But *nix is set up for multi-users, so it is set up a bit differently. There is /sbin/ for sytem binaries (executables), /bin/ for all-user binaries that are part of the installation. Individual users can put their personal executables in the bin/ directory in their home, and "extra" apps that you (as sys admin) want all users to have access to are usually thrown in /usr/bin/ or /usr/local/bin/

I guess for a single-user machine, "Program Files" is fine. For a system that was designed for multi-user, though, it doesn't cut it.

  • 2 months later...

I have tryed linux, liked it, and headed back to windows. Why ? 'cause i got scared of the thought of learning a hole new file system! after this, i really have my head set on linux, wich pops 2 questions on my mind (and yes its only 2 questions :p)

Wich distro is more suitable to handle media, games, and all around fun? (Yes my computer is my favorite toy !)

How can i have complex games (like counter strike) on my linex (probably using wine, if you have a guide to this prog, please share :))

Thanks for the attention, and thank you markjensen and everione else, for showing that linux is not a 2 headed monster !

Which distro? All are about the same, and anything lacking due to potential patent issues can easily be added with a command or two. Same for games (though, it may be easier to keep Windows around for your easy gaming needs).

  • 1 year later...
  rockwolf said:
Recommended Link: (suggested to be added to first post)

Filesystem Hierarchy Standard:

http://www.pathname.com/fhs/

This is the basis of the layout of the *nix file system.

Good reference from my quick overview. (Y)

Added to first post. Thanks!

  • 3 months later...

A graphical example layout would probably be helpful, I'll make one when I understand it myself (which I more or less do, except for the no top-level hard drive thing. What is the utmost highest level?)

and, ****, I'd hoped I'd be able to get rid of the annoying 'all users' 'username' program folders nonsense. What if you're the only one using your computer, all the time, and are kind of a neatfreak to boot? Whatevs

Thanks for info.

  nilsHaus said:
A graphical example layout would probably be helpful, I'll make one when I understand it myself (which I more or less do, except for the no top-level hard drive thing. What is the utmost highest level?)

and, ****, I'd hoped I'd be able to get rid of the annoying 'all users' 'username' program folders nonsense. What if you're the only one using your computer, all the time, and are kind of a neatfreak to boot? Whatevs

Thanks for info.

Graphics would be nice! :yes:

As far as top level, that is the root, or "/". You can attach (mount) hard drive, networked drives and anything else to locations in the regular filesystem.

And, *nix OSes have been multi-user for a very long time, so the foundation to separate users is a fundamental part of the OS design. You can, however, run as root if you like, and symlink your bin directories to one common spot, if you like. However, if you ever do want to set up (for testing, or what-not) an additional user account, you kinda just screwed yourself and made things a bit more complex by doing by it that way.

EDIT: A few filesystem graphics for you to get ideas from, for starters can be found using Google Image.

Well, I don't know how things are the Linux way, but if you're intending to use multiple disks, consider using a volume manager. LVM or what it is in Linux. It treats all added disks as one large logical volume. I think that's preferable over mounting different drives in a specific locations and play the remaining disk space game for each of those mounts. Instead, set up your system as you want, and when you run out of space, put disk into the computer, add it to the LVM and grow the filesystem running out of space.

Myself I've been spoiled by ZFS and don't want to miss it (Solaris user). I guess under Linux, putting at least your home folders on ZFS/FUSE may be an option if it becomes stable in future, since those will be the ones growing out of proportions while the rest staying more or less stable.

Here, it currently looks like this:

root@bigmclargehuge:~ > zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

		NAME		STATE	 READ WRITE CKSUM
		tank		ONLINE	   0	 0	 0
		  c3d0s7	ONLINE	   0	 0	 0
		  c0d0s1	ONLINE	   0	 0	 0

errors: No known data errors
root@bigmclargehuge:~ > zpool list
NAME					SIZE	USED   AVAIL	CAP  HEALTH	 ALTROOT
tank					293G   68.9G	224G	23%  ONLINE	 -
root@bigmclargehuge:~ > zfs list  
NAME						 USED  AVAIL  REFER  MOUNTPOINT
tank						68.9G   219G  8.03M  /tank
tank/home				   65.5G   219G	21K  /export/home
tank/home/root			   336K   219G   336K  /export/home/root
tank/home/servo			 65.5G   219G  1003M  /export/home/servo
tank/home/servo/Documents   1.12G   219G  1.12G  /export/home/servo/Documents
tank/home/servo/LargeFiles  11.3G   219G  11.3G  /export/home/servo/LargeFiles
tank/home/servo/Music	   2.74G   219G  2.74G  /export/home/servo/Music
tank/home/servo/Pictures	1.10G   219G  1.10G  /export/home/servo/Pictures
tank/home/servo/Video	   48.3G   219G  48.3G  /export/home/servo/Video
tank/opt					 448M   219G   448M  legacy
tank/usr					2.87G   219G  2.87G  legacy
tank/var					82.0M   219G  82.0M  legacy
root@bigmclargehuge:~ >
  • 1 month later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • How to take HDR screenshots on your iPhone running iOS 26, and other new features by Aditya Tiwari Apple has leveled up the screenshots game on its latest iPhone software update, iOS 26. Alongside the updated Photos app, Compact mode in Safari, and new wallpapers, iOS 26 comes with a redesigned screenshot editor, featuring the controversial Liquid Glass system design. The iOS 26 update brings new features and changes that let you customize your screenshot experience in a better way. For starters, it displays the captured screenshot with rounded corners, shifting away from the rectangle on iOS 18. Turn on HDR screenshots on iOS 26 A highlight of the updated screenshots features on iOS 26 is that you can take screenshots in HDR (High Dynamic Range). Apple has added a new Screen Capture page in the Settings app that lets you do that. You can follow these steps to enable HDR screenshots on iOS 26: Open the Settings app on iOS 26. Go to General > Screen Capture. Now, select the HDR option under the Format section. Press the Home + Volume Up button combination to take a screenshot. Next time you take a screenshot on your iPhone, it will be captured with full dynamic range and stored in HEIF format. In other words, if you take a screenshot of a photo and video available in HDR, the feature will preserve those details. On the other hand, the SDR quality saves screenshots in PNG format and offers more compatibility. As shown in the image below, you can check whether a screenshot is captured in HDR or not by swiping up on a screenshot in the Photos app to open its details. Record your iPhone screen in HDR on iOS 26 Not just screenshots, the HDR option also works for screen recordings. Such files are saved in HEVC HDR10 format, whereas screen recordings taken in SDR mode are saved in HEVC. After switching to the HDR options using the steps above, you can use the same old steps to screen record your iPhone; the option is available in the Control Center. That said, you can do a lot more to improve your screenshot experience on iOS 26. The Screen Capture page in the Settings app lets you customize your screenshot experience in multiple ways. Here's how use can use the different features Apple has added in iOS 26. Turn on full-screen previews by default When you turn on the "Full-Screen Previews" toggle button on the Screen Capture page, iOS 26 will display screenshots in full view instead of showing a small thumbnail in the bottom left corner that vanishes after a few seconds. The full-blown UI allows you to quickly edit or annotate a screenshot and share it with your friends across various apps. Alternatively, you can disable the toggle option and trigger this UI by tapping on the temporary thumbnail that shows up after taking the screenshot. Prevent CarPlay screenshots from flooding your device Apple has also changed (fixed) how screenshots work on CarPlay. Until now, screenshots on CarPlay have been an "it's a feature, not a bug" experience for the users. If your iPhone is connected to your car, an extra screenshot of the CarPlay interface is automatically captured when you press the buttons to take a screenshot on your phone. This functionality has been a pain point for many users, who have raised their voice on Apple's support forums. It seems the company heard them, and iOS 26 update brings a new toggle button in the picture, allowing you to have a manual way to enable or disable CarPlay screenshots. Use Visual Intelligence on screenshots iPhone's screenshot tool also supports the improved Visual Intelligence feature (works on iPhone 15 Pro or later). You can select objects in a screenshot and search for matching content in apps that offer integration with Visual Intelligence. These screenshot updates for iOS 26 are currently available for testing through the developer beta program on supported iPhone models. Apple is expected to release the first public beta of iOS 26 next month. If you plan to install the developer beta on your device, note that early builds may be unstable, and ensure that you back up your data in advance.
    • Looking around, it seems to indicate that an App is doing a download in the background.
    • Dopamine 3.0 Preview 39 by Razvan Serea Dopamine is an awesome free audio player which tries to make organizing and listening to music as simple and pretty as possible. Dopamine has been designed for Windows 7, Windows 8.x and Windows 10 and plays mp3, ogg vorbis, flac, wma and m4a/aac music formats quite well. The best part? It's created by long-time Neowin member, Raphaël Godart. If you’re looking for a music player to handle a large music collection, you should definitely give Dopamine a try. Dopamine 3.0 Preview 38 changelog: Added Added Ctrl-F shortcut to focus the search bar and ESC to clear it Added support for cover art images that have file name albumart.jpg, albumart.jpeg or albumart.png Added Turkish translation Changed Slightly improved the look of the mini player Improved scaling of text on Now Playing screen for smaller screens Order selections are now menus instead of toggle buttons Updated the Brazilian Portuguese translation Updated the Spanish translation Updated the Turkish translation Updated the Vietnamese translation Fixed Fixed an issue where a random song would start playing after the queue ended when using gapless playback. Fixed an issue where album lists were not refreshed after a search returned no results. Fixed an issue where progress was not reset to 0 when playback has finished Fixed an issue where a track that is longer than 4 minutes was scrobbled to Last.fm immediately after it started playing Fixed some sizing issues on the "Folders" screen Fixed search problems Download: Dopamine 3.0 Preview 39 | 98.4 MB (Open Source) View: Dopamine Home Page | Forum Discussion | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Here's what to expect from Samsung's July Unpacked event by Hamid Ganji Samsung held its first Unpacked event of the year in January to unveil the Galaxy S25 series. However, the Korean OEM is also gearing up to hold its second 2025 Unpacked event sometime next month, focusing on its next-generation foldable phones and a new pair of Galaxy Watch wearables. Samsung might also give us a detailed look into the upcoming Project Moohan XR Headset and a rumored tri-folding smartphone that might launch later in the year or early 2026. One UI 8 is another topic Samsung might discuss at the event. Here's everything we expect Samsung to unveil at next month's Unpacked event. When the event kicks off To date, there have been conflicting rumors about when the Unpacked event will start. However, the latest hint comes from renowned tipster Evan Blass, who says the second 2025 Unpacked event begins on July 9, 10 AM EDT. Samsung has yet to confirm the alleged date, but it aligns with the company's unveiling of the Galaxy Z Fold 6 and Flip 6 on July 10 last year. New foldables are down the road Galaxy Z Fold 7 and Galaxy Z Flip 7 will take the stage at the upcoming Unpacked event. Both phones will offer upgrades compared to their predecessors, but the overall design is expected to remain relatively the same. Some sources have claimed Z Fold 7 would be Samsung's thinnest foldable ever, presumably 4.5mm thick when fully unfolded. Also, Z Fold 7 might get a bigger screen at 6.5 and 8.2-inch. Samsung might also switch to a 200MP camera in the lineup. Other rumored specs for Samsung's next-gen foldable include Snapdragon 8 Elite, a 4,400 mAh battery, and One UI 8 out of the box. Meanwhile, there are also some swirling rumors about a so-called Galaxy Z Flip 7 FE (Fan Edition) in the pipeline. The device could be a stripped-down version of Samsung's Galaxy Z Flip 7 with lower hardware specs and a cheaper price tag. A new pair of smartwatches Samsung will also reveal the Galaxy Watch 8 and a Classic variant at July's Unpacked event. As for design, we don't expect a radical makeover for the Galaxy Watch 8, but the Classic model could take most of its cues from Samsung's Galaxy Ultra watch models. Also, the Watch 8 Classic could bring back the rotating bezel on top. Both watches will come with One UI 8 Watch out of the box and Gemini AI to replace the Assistant. Gemini could help with health features and keep track of users' physical activities. Samsung was also rumored to be working on Blood glucose monitoring for next-gen smartwatches, and it might finally make its debut at the upcoming Unpacked event. More details about July's Unpacked event will surface in the days leading up to it. You can watch the live stream of the event through Samsung's website or the company's YouTube channel.
    • Can't they just allow people to hide the status bar (battery etc.) when Safari is open and to hide the bottom bar completely when scrolling for a true full-screen experience ? Samsung does that on its Samsung Internet Browser and it's a very good experience.
  • Recent Achievements

    • One Month Later
      serfegyed earned a badge
      One Month Later
    • Dedicated
      firey earned a badge
      Dedicated
    • Dedicated
      fettermanj earned a badge
      Dedicated
    • One Month Later
      SekTheFirst earned a badge
      One Month Later
    • First Post
      zayanhani earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      636
    2. 2
      ATLien_0
      231
    3. 3
      Michael Scrip
      219
    4. 4
      Xenon
      145
    5. 5
      Steven P.
      141
  • Tell a friend

    Love Neowin? Tell a friend!