Linux Newbie Guide
So, you've heard about this operating system called Linux, and are curious to try it out on your PC? This guide intends to demonstrate some of the basics, such as the layout of the Linux filesystem, how to install applications (through a package manager), and of course, how to get Linux running on your PC. (No responsibility is taken for any data loss, etc.).
Firstly, there are a number of options for installing it on your PC.
This is the standard installation method, which will install Linux on its own partitions on the hard drive. This can be done by itself (being the only OS on the computer), or as a dual-boot with another OS. If dualbooting with Windows, make sure to install Windows BEFORE installing Linux. Installing Windows after installing Linux will mean that the Windows bootloader will overwrite the Linux one (I think)...basically, you won't be able to boot Linux.
This is not really an installation method as such, but is very useful for trying Linux. What a LiveCD does, is that when you boot the PC with the LiveCD in the drive (and the BIOS set to boot off the optical drive), you will load a complete Linux desktop off the CD (loading it into RAM). You can try out an installation with this, and I find it particularly useful to use as a rescue disc in case you can't boot your standard OS. It is also a reasonably effective method of testing whether your hardware will be supported by default.
Many modern distros (Ubuntu is a prime example) will combine the Live CD and an install CD, essentially meaning that you can boot into the OS off the CD, and then install it to the hard drive through the CD. Some operating systems could also be installed from a USB pendrive in this way.
Wubi is a relatively new installation method which is designed for Ubuntu only (sorry for the Ubuntu references, but it's what I'm used to), where Linux will be installed (or uninstalled) though Windows as a Windows application, with the option to boot Ubuntu Linux placed in the Windows boot menu. Wubi does not repartition your hard drive.
If anyone's used VMware or similar virtualisation programs, they'll know what I'm talking about. It's useful if you need to run Linux at the same time as Windows (or OSX). An example would be if you're designing a webpage and want to see how it looks on a Linux machine compared to a Windows machine.
Partitioning Linux and the Linux filesystem
"Where's the C: drive?" is a cry of Linux newbies everywhere. The Linux (well, the UNIX filesystem) is arranged completely different to Windows. Rather than having a separate 'drive' for each physical drive, the whole filesystem is arranged in a tree. The main (I guess the closest thing to C:) part of this filesystem is the root directory. This is called /, and all other directories will fall under this. Extra physical drives will be mounted (made so Linux can access them) through other directories (like /media/cdrom or /movies).These directories have their own functions, as do the "Program Files" and "Documents and Settings" directories on a Windows machine. Some of these directories work in a similar way to Windows directories:
/home/username - This is the Linux equivalent of the C:\Documents and Settings\Username directory. In a standard install it is the only directory that non-root (Administrator) users have write access to.
/usr and /opt - These are roughly the equivalent of the Program Files directory, and will contain installed applications. Now, back to partitioning. On a single-drive, Linux-only machine, you can have a minimum of two partitions. The first partition will be the root directory (/), which will take up nearly all of the hard drive space. The second partition will be the swap directory (equivalent of pagefile.sys), which will not be visible to users. Typically the swap directory is to be twice the size of the amount of RAM in the machine, but I've usually made mine about 512MB-1GB, with no hit to performance. Many systems will wish to put some directories as a separate partition (even on a separate physical drive), so you might allocate a certain amount of space for the root directory, and another partition for the /home directory.
Why are there so many different distributions?
The reason for the large variety of distributions is that Linux is all about choice and customisation. No two PCs are the same, and no two users are the same. The major differences between distributions are the package management systems (how to install programs), the standard desktop used (the two largest are GNOME and KDE), and the extra applications used. Some people will prefer the KDE desktop with Debian's APT package manager, others will prefer GNOME using Redhat/Fedora's RPM package management system. Some will desire only the applications they use everyday to be installed by default, others will want everything and the kitchen sink installed. Some will want flashy desktops with 3D effects on the windows, some will want a minimal desktop designed to run on low-end hardware, and some will require no graphical desktop at all (perhaps with server applications installed). This is before even discussing the plethora of different options there are for server environments.
One of the most popular distributions currently out there is the Ubuntu Linux distribution. The standard distribution is based on APT with a GNOME desktop (although derivatives of Ubuntu come with other desktops).
A time-line of Linux distributions can be found here showing the main forks and where the various distributions are built from.
This is distribution dependent, and relies quite heavily on which package management system is used.
Software is usually installed from online software repositories. Software can be installed by using the command line interface (CLI) or by using a graphical user interface (GUI). Differences in the CLI syntax varies by distribution, as does the GUI software. Popular GUI software includes Synaptic for systems based on Debian that use the apt method.
Installing software using a CLI is usually not as bad or painful as people new to linux imagine. For example, to install the Mozilla Firefox web-brower using the Debian APT package manager (continuing with the Ubuntu theme):
apt-get install mozilla-firefox
Will attempt to install the package "mozilla-firefox", however, installing packages requires administrator privileges, so, generally, unless you're logged in as root (which is not advised), you will need to use one of either the sudo or su commands. Su temporarily allows the current user assume the shell and thus privileges of another user, wheras sudo allows you to issue one command or series of commands as another user, once the command has completed, you're back to your original shell, seemingly having never left. Until someone familiar with su adds something, we'll continue the article using sudo:
sudo apt-get install mozilla-firefox
Will attempt to install mozilla-firefox as root, immediately after issuing this command, you will be asked for the superuser password. Given the correct password, it will download and install the package and any dependencies as root, and all will be well.Dependencies are basically packages or files which another package requires in order to run correctly. For example, the package firefox-greasemonkey, which installs the popular greasemonkey plugin for firefox, requires that several of the core firefox packages be installed first. You cannot add plugins to a browser that is not yet installed after all.