One of the most significant changes is that while Windows keeps all system files in one directory, Linux (and its Unix cousins such as FreeBSD or Mac OS X) spreads them out a bit more.
Everything in Linux is relative to the root directory. This is referred to by the system as /. To demonstrate this, open the terminal and enter the following:
Follow this with the following:
The cd / command moves you to the root directory. The ls command then lists the files in that directory. Here's my output from this:
bin cdrom etc initrd lib media opt root srv tmp varEqually, you can use a file manager such as Nautilus or Konqueror to view your root directory. Konqueror allows you to specify the path to a folder to view it, so in the URL bar you can just enter / to view the root directory. Other file managers, such as Nautilus, don't all support this, so for these you can just keep moving up through the directories to reach the root directory.
boot dev home initrd.img lost+found mnt proc sbin sys usr vmlinuz
One important point - don't confuse this with the root user! Think of the filesystem as a tree, with the root directory being the base of the tree and the folders being branches on that tree.
Now, I'll tell you what the individual folders are for:
- /bin - Essential commands for your system
- /boot - The information used to boot your system, including the Linux kernel
- /dev - Device drivers
- /etc - Configuration files for your system
- /home - This directory contains the home folders of all users on the system. For instance, as I'm the sole user on my laptop, the /home folder contains one folder, which is /home/matthew. This contains all your settings and preferences as hidden folders, together with anything you choose to save there.
- /lib - The libraries that many programs use.
- /media - This is where the system adds temporary media such as floppy disks or CD-ROM's. When I connect my iPod Shuffle to my Kubuntu laptop, it gets mounted by default to /media/ipod.
- /mnt - This is where you add extra filesystem components such as networked drives. Basically, anything that's not permanent, but less temporary than the kind of things that go in /media.
- /opt - This is generally used for installing new software. Not all programs installed by apt-get or dpkg use this by default though. If you ever have to install something from tarballs (a common format for applications packaged for any Linux distribution), this is a safe place to install it.
- /proc - Current settings for your kernel.
- /root - The root user's home directory. As Ubuntu doesn't have a separate root account, you may find this doesn't get used much.
- /sbin - Commands the system administrator needs.
- /srv - Data for your system's services.
- /sys - Kernel information about your hardware.
- /tmp - Temporary files.
- /usr - This is virtually a separate filesystem in its own right! Contains a huge number of important files and folders.
- /var - Data that changes frequently, such as log files and mail.