The DistRogue

Saturday, July 14, 2007

A quick tour of the Linux filesystem for Windows users

I had the question asked again. You know the one: "Where's my C:\ drive?". So, to prevent it from happening again, I'm writing a guide to the Linux filesystem for Windows users.
Basics:
The Linux filesystem is organized a bit differently than Windows's filesystem, but it still has the basics, such as folders and removable devices. Finding them is the issue. The root of the Linux filesystem (the equivalent of Windows's C:\) is /- just a forward slash. Instead of a backslash, a forward slash is also used to show directories- for instance, a Linux path could be "/usr/bin/X".
That should clear some things up. But obviously, that's not enough for most people. So, here are some summaries of what the top-level folders are, and what's in them:
/bin and /sbin
What's in it: Binary files (read: programs) that are part of the core system. /bin is for main programs, /sbin is for maintenance apps.
What it's equivalent to: C:\WINDOWS; C:\WINNT
Example of something in there: /bin/bash, /sbin/init
/boot
What's in it: Files vital to the system's boot process; stuff like the kernel and boot loader
What it's equivalent to: Nothing
Example of something found in there: /boot/vmlinuz, the Linux kernel.
/etc
What's in it: Configuration files
What it's equivalent to: C:\WINDOWS
Example of something found in there: /etc/X11/xorg.conf
/home
What's in it: User files
What it's equivalent to: C:\Documents and Settings
Example of something found in there: /home/{user name here}/Desktop, the folder that stores the files you see on your desktop
/lib
What's in it: Libraries. Note that Linux libraries do the same thing as Windows .dll files, but they have a .o or .so extension.
What it's equivalent to: C:\WINDOWS
Example of something found in there: /lib/libSegFault.so, a library that you don't want to see all that often...
/media or /mnt
What's in it: Mount points. Folders under /media or (on older distros) /mnt are where other media devices (and partitions) can be accessed.
What it's equivalent to: D:\, E:\, F:\, etc.
Example of something found in there: /media/hda2, which would be the second hard-disk partition.
/opt
What's in it: Not much. Some large programs can be installed there, for instance, Flash Player, Google Desktop and VirtualBox.
What it's equivalent to: Nothing
Example of something found in there: /opt/azureus
/proc
What's in it: Processes. /proc is used by the kernel to access processes. So don't be messing around in this folder! It also holds vital status info.
What it's equivalent to: Nothing
Example of something found in there: /proc/cpuinfo
Further reading on /proc on Linux can be found here.
/root
What's in it: The Superuser's home folder. On Linux, root is so important he gets his own root directory!
What it's equivalent to: C:\Documents and Settings\administrator. Lap of luxury, huh?
Example of something found in there: /root/stayoutofmyfreakingbusiness
/tmp
What's in it: Temporary files
What it's equivalent to: C:\temp, C:\WINDOWS\temp
Example of something found in there: /tmp/audacity1.2
/usr
What's in it: Files for non-core programs. Basically a duplicate of /, with its own /usr/bin, /usr/lib, and more.
What it's equivalent to: C:\Program Files- sort of
Example of something found in there: /usr/bin/nexuiz
/var
What's in it: Variable files that change frequently, including logs. /var/log is the equivalent of the "Event Viewer" in Windows, and the best part? It's completely searchable.
What it's equivalent to: Nothing
Example of something found in there: /var/www/html. Didn't know you had a Web site, did ya?
I hope this helps you Windows users stumblefind your collective way around Linux's filesystem. Reviews for ELive 1.0 and Wolvix 1.1.0-rc2 still coming right up!
From Xubuntu 7.04,
The DistRogue.

Labels: , ,

2 Comments:

Anonymous Anonymous said...

/var is also the place where you see system logs and such. Its a place to look when you're troubleshooting problems.

In essence, its similar to Event Manager. (In a sense...But without the cryptic error codes!) :)

2:01 AM  
Blogger DJ Gentoo said...

Forgot about that. Event Manager... Yeah, that could get annoying...

3:24 AM  

Post a Comment

<< Home