Filesystem & file organization in Linux

A Linux system, just like any *NIX based system doesn’t differentiate between a file and a directory, since a directory is just another file which contains names of other files. Applications, programs, documents, services, images and just about everything else on a Linux operating system is a file!

Let’s hope that our earlier article — Which Linux distro is right for you? — helped you decide a distro suitable for you. With the assembly of a complete Linux machine, it’s time now to look into the architectural design of the operating system and look how robust Linux is with an efficient file management system it has. We shall now dive in to understand the file system and the file hierarchy of a Linux system.

A common description of the UNIX system, which also holds good for a Linux operating system says,
On a UNIX system, everything is a file; if something is not a file, it is a process.
This statement holds good because there are special kind of files that are more than - just files, say - pipes and sockets, for that matter. But, saying that everything is a file is an acceptable generalization, just for simplicity. A Linux system, just like any *NIX based system doesn’t differentiate between a file and a directory, since a directory is just another file which contains names of other files. Applications, programs, documents, services, images and just about everything else on a Linux operating system is a file! Even the input and output devices are considered as files, according to the Linux system.

In order to manage all these files in an organized and orderly fashion, we think of them in a tree-like structure on the hard disk. We shall now continue to use this image of the directory while we shall peep into the roles of each leaf of the tree. The picture below says it all.


Linux Filesystem Basics

Image from Linux Config

Linux Filesystem BasicsIn Linux, everything is a file.

The file system where a Linux distro is probably installed is either ext2 or ext3 and is referred to as data partition. The other important partition is known as the swap partition which works as an extended physical memory. It is generally advisable for the swap partition to be 1.5 times the amount of physical memory installed on the system.

That was a picture of the file organization in a Linux operating system. Linux also has a remarkable support for a large number of file systems - ext, ext2, minix, umsdos, msdos, vfat, proc, xia, smb, ncp, sysv, iso9660, hpfs, affs, ufs, etc. The file system, as we saw, is represented hierarchically with ‘/’ (root) being the top most level. Each new file system is added into a single file system tree as and when it is mounted.

All the file systems are mounted onto a directory and the files of the mounted file system form the existing contents of that directory. This directory is called the mount directory or mount point. When the file system is unmounted, the mount directory’s own files are once again revealed. This great feature of Linux systems to enable on-the-fly mounting and un-mounting of various file systems without the need of fetching different drivers, makes them stand apart. This also gives the users and developers freedom to choose from a variety of file systems to handle their files.

The kind of organization Linux has for the files is a good reason in making Linux systems more secure. The estimate of how strong this architecture is can be made by the fact that there has hardly been any noticeable change in this design over the past decade. So, this means we’re running a system which has deep underlying roots!
Praval, the author of this article is available as a freelance writer and technology blogger. He writes reviews and stuffs related to Wordpress, Linux, Information marketing, Open Source Softwares, Life hacks and technology in general. He also provides information marketing solutions to his clients. You may reach him at Praval.com.


Don't like it? There are lots of published articles, pick a random one.

oCricket

Praval Singh posted this article on Mon, Jun 9th, 2008 at 9:54 am
Categorized under Linux, Technology and has the following tags

Suggest 1 or more tags for this article

Use a comma (,) to separate 2 or more tags.

[?]

Prev Article: Get your Virtual Office in India

Next Article: The power of ‘root’ in Linux


Possibly Related Articles

Archives: Visit the Archives for more articles.

Comments Post Yours

There are 4 responses so far. You can follow any responses to this entry through the RSS feed. You can leave a response, or trackback from your own site.

  1. Good explanation, though I wish it went more into advanced details.

    Stumbled and submitting to Digg, hope atleast this one clears the gauntlet.

  2. asinomasimple June 10th, 2008 at 9:05 am 2

    Just wanted to say that I’m looking forward to you Linux articles.
    I installed Ubuntu on an old machine about 4 months ago when I found out there was a FlexBuilder alpha. I have only used it about 4 times ever since, mostly because because I can’t get wireless to work and I can get my head around file permissions and the “sudo”. I’ve never been interested in computers and knowing how they work. I’m willing to keep trying though, I’m sure your articles will help me in my path to enlightment.

    Thanks!

  3. @Sumesh: Thanks for your words! We shall slowly graduate to advanced Linux discussions and topics. But we’ll make sure that the newbies do not lose their interest.

    @asinomasimple: Great to see you learning Linux and we’re happy that we could be some help to you, through these articles. Thank you!

  1. Pings & Trackbacks Sites, articles & blog posts linking back to this article.

Post yours

Sidenotes

Quick notes, scribbles, somehow related to this website and to what I do. Or perhaps I'm just plain lazy to make them into a full article.

The Twitter Song: You're No One If You're Not On Twitter

Here is the awesome Twitter Song from Ben Walker. [audio:http://audio.brajeshwar.com/you-are-no-one-if-you-are-not-on-twitter.mp3] If you enjoy this, you might like to watch The Rise and Fall of Twitter. You're No One If You're Not On Twitter (Lyric) You're no one if you're ...26th Aug, 2008

Download Series AA Equity Financing Documents from Y Combinator

Y Combinator and Wilson Sonsini Goodrich & Rosati announced the Series AA Equity Financing Documents. Their goal is to make angel funding rounds for startups easier for both sides. While they may not be suitable for ...23rd Aug, 2008

The rise and fall of Twitter

Superb, Awesome! Couldn't avoid having it here for people to enjoy. Via: TechCrunch. 9th Aug, 2008

Spawning does Django

Our team had a discussion yesterday why Spawning might be a good solution for our Python-Django specific Web server. The discussion is still hot on the table and have not come to a conclusion; nonetheless, ...2nd Aug, 2008

Take the A List Apart 2008 Survey

It's A List Apart's second annual survey for people who make websites. I took it! And so should you. The Survey for People Who Make Websites. This year's survey corrects many of last year's mistakes, with ...29th Jul, 2008

View the Sidenotes Archive

Play the Penguin Game

Recommended

  • My Special Job My Special Job is a place where you can look for your weird necessities, strangely superb employees, when your need are more of those hackers, geeks, and ultimate rockstars in the Internet Technology.
  • o! Just Me Of colorful cultures, entertainment, media, life hacks, music, books and movies from hollywood & bollywood.
  • Downloads All downloads, Free and Open Source.
  • Ode to Apple Dedicated to Apple - Mac, iPhone, iPod, iTunes, Quicktime, Apple TV and all the awesome softwares for the Apple Mac.
  • Oinam The official conglomerate of the Oinam related companies, institutes and holdings.
  • AS 2.0 Reference Reference for ActionScript 2.0 Programming Language used in Flash. Primarily stashed here for my own personal reference.
  • Forum Oinam’s technical discussion forum where developers and designers can discuss all technical topics.

Download free Brajeshwar Wordpress Theme

Brajeshwar

Brajeshwar I firmly believe in keeping things simple, easy for users and I envison pushing the technical envelop time and again for the betterment of viable commercial and practical applications. More about me.

Brajeshwar Personal Identity Portal powered by VeriSign Labs

Brajeshwar's affinity with Adobe

My Photos

More photos on Flickr

Member of 9rules Network

Since its inception on 11th June, 2001, "Brajeshwar" has 845 Articles and 5,920 comments, contained within 20 categories and 1,174 tags.