Where's my C:\?!

Associate
Joined
3 Jan 2006
Posts
1,842
Location
South Wales
Im going 100% Linux at home. Im going for Linux Mint as it looks nice and Ive used it a little before and videos/music "just work" on it.

Anyway, Ive never really given Linux much patience but it seems now is the time to go as its really easy to install stuff now. One thing that confused me was the file structure. I found the info below and its really made my Windowised brain undestand Linux a little more. Hope it helps someone else.


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?

http://distrogue.blogspot.com/2007/07/quick-tour-of-linux-filesystem-for.html)
 
That was pretty informative. It's kinda sad though that some of us think the way Windows runs is the way everything runs.

I need to get my head out of MS ass lol.

The only thing that I still find hard to grasp is /mnt. That I have to assign a folder for a device. Brain cannot compute
 
That was pretty informative. It's kinda sad though that some of us think the way Windows runs is the way everything runs.

I need to get my head out of MS ass lol.

The only thing that I still find hard to grasp is /mnt. That I have to assign a folder for a device. Brain cannot compute


Yeah, but you can hang them anywhere....

Imagine in windows your C was full, wouldn't it be cool to transparently have another partition for program files?

Call them /mnt/d /mnt/e /mnt/f if you like


look at how mine are laid out (and this is a simpler box that the old one)

hal9000 ~ # cat /etc/fstab

########LOCAL########

/dev/sda7 none swap sw
/dev/sda5 / ext3 defaults 0 1
/dev/sda6 /home ext3 defaults 0 0
/dev/hda1 /mnt/media ext3 defaults 0 0
/dev/sdb1 /mnt/play ext3 defaults 1 2
/dev/sdb5 /mnt/work ext3 defaults 1 2
/dev/sdb6 /mnt/dump ext3 defaults 1 2


######Externals########

/dev/freecom1 /mnt/usb1 vfat users,umask=000
/dev/freecom2 /mnt/usb2 vfat users,umask=000

/dev/freecom3 /mnt/usb3 ext3 users

/dev/freecom4 /mnt/usb4 vfat users,umask=000
/dev/freecom5 /mnt/usb5 vfat users,umask=000
/dev/freecom6 /mnt/usb6 vfat users,umask=000

/dev/passort /mnt/passport vfat users,umask=000

/dev/dvd /mnt/burner iso9660 ro,users,defaults
#######NETWORK--SAMBA########

//guzunda/shared /mnt/shared smbfs username=steve,password=steve,
sers,user,defaults 0 0



//guzunda/shared/store/download/ /mnt/shared/store/download smbfs
,password=steve,uid=steve,gid=users,noauto,user,defaults 0 0


none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0



Takes a bit of bending the brain round if you know windows but have no experience of any proper computers at all.
 
You have 7 USB drives??? bloody hell

What distro and Samba version are you using?

iirc smbfs is obsolete now, replaced by cifs (which works a lot better for me)

//guzunda/shared/store/download/ /mnt/shared/store/download smbfs
,password=steve,uid=steve,gid=users,noauto,user,de faults 0 0

There's an error in the defautls flag there
 
Yeah, 6 500GB Freecoms and a 320GB WD passport. Full of tv shows mainly, and backups and backups of backups.

I see the error, but I think it happened during pasting, it's not there in the original file.


It's Gentoo, not sure what profile it was when installed, but it's bang up to date as of Sunday.

We still use Samba because nobody in the house can be arsed learning about cifs and writing new configs for it etc etc etc. When Samba stops working, we may bother ;)
 
Back
Top Bottom