LinuxFAQ

ShscWiki :: LogIn :: PageIndex :: RecentChanges
Eventually this will house many questions about the linux family of operating systems. If you would like to add a section, or would like to write for a section, send me an email, metiscus@gmail.com

General Topics:

What is Linux?
Commonly, Linux is known as an Unix-like operating system originally developed for the 386 computer by Linus Torvalds. Technically, Linux is only the kernel, but over time the tools that commonly accompanied distributions of the kernel came to be known collectively as Linux.

The History of Linux (abridged)

Why are there so many types of Linux?
Linux is used in a variety of situations and has been adapted to overcome and fill a variety of niches. Each environment has its own set of peculiarities and commonalities; some distributions have come about to provide a set of tools to overcome the mean problem set. Other distributions have come about for a specialized purpose i.e. web servers. Each distribution has a history, and it is important to consider the history of a distribution before selecting to run that distribution. Remember that the oldest distributions may not always be the best for the problem you are confronted with. If you have a reason to be running Linux, chances are there is a distribution that will fit your needs.

Where can I get Linux?
As stated above, there are over 300 indivdual distributions out there under active development, I have no intention of attempting to list every single distribution in active development. I will, however attempt to first list some popular ones, give a short blurb about them and then give some links to where you can find more information.

RedHat
This is probably the most well known distribution of Linux out there. Pretty much everyone has at least played with a box running Red Hat at some time. Known for it's package management system as well as its user-friendliness Red Hat has been the staple of the Linux newbie for years. Red Hat comes in two distinct types, a corporate geared Enterprise version availible for a fee, and Fedora the old standard personal edition. There is also a free distribution geared for the enterprise called Centos which is compiled from current Red Hat source code and distributed under a different name.

Mandrake

Debian
A very popular distribution among experienced users, both in server and desktop environments, with a large and active development community. Debian package management system, and well-maintaned repositories that it uses, provide a relatively easy way to install the system, keep it up to date with fixes and updates, and install various packages with installer taking care about the dependencies on other packages. Newbie users often find the installation process to be intimidating (installers often ask technical questions with rather brief explanation of their meaning, and the users often need to read documentation to be able to configure the system optimally for their purposes). However a knowledgeable user usually prefers this kind of environment, with installers taking care of the trivial matters of dependencies and initial configuration, leaving him in charge of all configuration/customization that is reasonably preserved over upgrades.

Debian is developed in three branches -- "stable", "testing" and "unstable". "Stable" is supposed to be the supported release, with no new development being added after the release except for bug fixes and major kernel updates. The time intervals between "stable" releases may be up to a few years, what is nearly eternity on the Linux development timescale, so toward the end of its lifecycle "stable" often turns into a collection of ancient releases (but still being maintained and updated with backports!), gathering ridicule from impatient users who call it "stale". After a three-year release cycle that produced the previous "stable" version "Sarge" (3.1), a year later "Etch" (4.0) was released in what most users considered an acceptable interval between major releases.

"Unstable" is where all the current development is being done. Though authors do not guarantee anything about this branch usability, many people successfully run "unstable" on their desktop boxes. "Unstable" refers not to the reliability of the software, that may be comparable to what others call a release, but possibility of sudden changes in packages and overall design, as the development progresses, making this branch unusable for applications where reliability is the main requirement. Security updates for "unstable" are not maintained, however since "unstable" follows the development of packages done by original authors, fixes for newly discovered bugs quickly end up in the regular updates, and are picked up by the users.

"Testing" is a branch that is supposed to eventually become "stable" -- it adopts changes from "unstable", and develops a consistent system that can be later released and supported. Its usability is not guaranteed by developers, however many users find it to have a good balance between rapidly changing "unstable" and seemingly never changing "stable", so it is often used on servers and desktops, especially toward the end of release cycle when "stable" is seen as outdated, and "testing" is expected to be soon frozen and declared a new "stable". The dowbside of the choice to run "testing" is a delay before bug fixes (including security-related ones) propagate into it -- both "stable" and "unstable" get those fixes earlier -- "stable" by the virtue of being supported, "unstable" by closely following cutting-edge development. Then, after a few days, "testing" packages get updated with the same fix.

Currently, 4.0 "Etch" is a recently released "stable", so the difficult choice between "stable" and "testing" does not exist anymore -- possibly until the middle of the next cycle.

Despite following the development of various packages, Debian often lags behind the cutting-edge development of them, trying to keep consistency with established infrastructure and avoiding sudden changes. This results in painless dependencies and configuration maintenance, however users are often frustrated to see Debian lagging in adoption of new versions when some particularly interesting and useful development is done.

Gentoo
This distribution is known for being compiled from scratch, although there are other options for installation which utilize precompiled binaries. It has its own package management system called portage and its package manager program called emerge. Some consider Gentoo to be a good teaching Linux environment as you must learn quite a bit to even get it installed. Some think that Gentoo is overrated in this aspect because its installation does not require any greater understanding of packages being installed, and is merely a typical Linux environment with user/administrator runs scripts that perform complex tasks. There is a great newbie guide that walks you entirely throught the installation which is hosted from the distribution website. It has one of the most complete sets of documentation of any Linux distribution, and probably the most active user community.

The downsides of Gentoo are its reputation of a "ricer distro", and possibility of sudden inconsistent changes that break dependencies for a short while and frustrate the users that try to update their systems or install new packages.

The "ricer" reputation is caused by many users configuring their compilers to use pointless, and sometimes unreliable optimizations when they compile Gentoo packages' sources, and spending a disproportionate amount of time compiling and recompiling them, wasting more resources on constantly running the compiler than gaining from supposedly more optimized system, not unlike some car modification enthusiasts known as "ricers". There once was a site www.funroll-loops.org dedicated to deriding and taunting Gentoo users ( "-funroll-loops" is one of the optimization options, "-f" being a prefix and "unroll-loops" causing the compiler to replace some loops with repetition of their code, sometimes increasing the performance, sometimes decreasing it). While the site disappeared long ago, "funroll-loops" is still a typical insult toward Gentoo users.

The inconsistent changes usually show themselves when the system is being upgraded. Source packages usually rely on both gentoo-specific patches and GNU Autoconf to adapt to the particular setup of a Gentoo system, what in theory should always configure them to become consistent with each other's configuration and presence/absence of optional packages. In practice Gentoo's close following of the cutting edge of development sometimes produces changes in one package that others aren't ready to properly interpret, so when the new versions are compiled, the compilation may fail, or package may miss a feature that depends on some other package's configuration if its compilation procedure can't detect it due to some unrelated change (ex: library libXv at some point was moved from /usr/X11R6/lib to /usr/lib, and recompiling Xine after that caused new binary to be built without that library's support because the Xine configuration script was not updated to reflect a moved library). Developers "mask" versions that have problems, however in many cases a user wants to compile a package that only has masked versions, this wandering into an unsupported territory.

For an experienced user who applies common sense to configuring compilation options, and can either wait for a release of a package, or manually fix the unsatisfactory configuration, Gentoo is a great and flexible system. For a newbie it may be challenging, however the nature of the problems that he may face, and lack of real harm to the system from even failed compilation, provide a good learning environment. However an occasional user, if he chooses gentoo, should better stick to binary updates.

Slackware
This distribution is known by veteran linux users as being both difficult to install and very secure. As the oldest distribution under active development, slackware has come a long way in the direction of ease of use, but still lags far behind the graphical installer of Fedora or Ubuntu as far as newbie friendliness is concerned. Slackware, because of its lineage, has a few oddities i.e. the name and location of the rc scripts -- it is closer to Unix and BSD than most of its contemporaries. Slackware notably lacks a package manager with dependacy checking but there have been many substitute managers written, namely swaret and slapt. The no frills approach as well as outstanding security record makes this distribution the choice of many Linux enthusiasts.

Ubuntu

This distribution is branched from Debian, to address newbie-unfriendliness and long release cycle of otherwise excellent Debian. It succeeded in achieving both those goals, and now boasts the shortest release cycle (6 months), very user-friendly initial configuration of GNOME desktop environment, and allows the user to install KDE (kubuntu) or Xfce  (xubuntu) instead of default GNOME. OS installer running from a live CD -- CD boots into a fully-functional desktop environment, from where the system can be installed on the hard drive. The fully grapical installer takes the difficult parts of installing Linux and hides them behind a shiny gui. Ubuntu has an easy installation procedure for proprietary drivers used by 3D graphics cards from ATI and NVIDIA, allowing their users to avoid going through rather cumbersome installers provided by their manufacturers. Ubuntu also was the first to include GNOME Network Manager interface that greatly simplifies network, especially wireless cards, configuration.

To further increase its user-friendliness it has a simplified system updates installer that automatically checks package repositories for updates and notifies the user with an icon/balloon message not unlike Windows Update. Unlike Windows Update (and like all other Debian-based package management utilities) it never annoys the user with multiple pointless reboots -- after all updates are installed, and system is up to date, installer restarts all subsystems that need to be restarted, and only if reboot is absolutely necessary, another icon/balloon message tells the user that he has to reboot before the update will take effect. Those, and some other similar messages are occasionally derided by old-school users as unnecessary hand-holding, however they perform their function pretty well.

Ubuntu users community is very active, its online presence and abundance of FAQs and HOWTO documents posted on Ubuntu forums rivals Gentoo.

SuSE


What Linux distribution should I use?
Go here for an interactive test process that will help you decide and teach you various things about Linux along the way. Don't post a thread in SH/SC about it.

When it comes right down to it, you should do the following:
1. Sit down and lay out the problem that you intend to overcome with Linux. Include stipulations about computational power and storage requirements.

2. Decide what hardware you will need, (or in the case of an existing system just collect the various parts of your configuration in one place) and note vendors, models, and chipsets.

3. You may want to consult with an expert in the field who has already solved said problem and gain insight to possible pitfalls that lie ahead.

4. Develop a list of OS Specific requirements based on hardware and future software purchases.

5. Research the project pages, mailing lists, and forums about each distribution of interest and see how it measures up.

6. Narrow your list down by installing each distribution and configuring it. Do extensive testing with all of your software to ensure compatibility.

7. Make your final decision based on cost analysis and security.



Install Issues:
How do I partition my hard drives?
The most common way to partition your hard drive is to use the fdisk utility that comes on your Linux install cd. Note that the Windows fdisk utility does not create nonwindows partitions and therefore will not work for this. You invoke the fdisk command like this:

/sbin/fdisk (device name)

In order to continue, you will need to learn a little bit of the Unix paradaigm, that is "everything is a file". What this means is that every part of the system, from harddrives to the keyboard and mouse is represented as a file in the /dev directory. Customarily, hard drives (this assumes that you are installing on IDE hard drives as SCSI and SATA take a little more work) are labeled as follows:

/dev/hda the primary master hard drive
/dev/hda1 the first partition on the primary master
/dev/hdb2 the second partition on the primary slave
/dev/hdc1 the first partition on the secondary master

If you do not understand the terminology above {i.e. difference between primary and secondary, difference between slave and master} then you should do a little reading here.

For my example, I am going to install Linux on the primary master in three partitions, one for boot root and swap respectivly. There are many different theories on partitioning, and later I will discuss the pros and cons of each. For now, we invoke fdisk with:

/sbin/fdisk /dev/hda

For reference, I have listed the commands to my version of fdisk (which are probably the same as yours) below, if you get lost you can always enter the help command (m on my version) and the list below should be shown.

a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

To begin, we should check to see if there are already partitions on the drive. So we select the menu choice beside "print the partition table" which in my version of fdisk is p. My disk is empty so I will continue on, should you have partitions present that you wish to delete, use the "delete a partition" command and then select a partition by number.

I want to make a new partition for /boot, which I have decided to make 200 megabytes in size. I give the command "add a new partition" (n on my implementation). It next prompts me if I want to make an extended or primary partition. The difference is a lesson in computing history itself, but for my example we will use primary partitions. (You would not want to do this in the case that you are making more than four partitions, because each disk only has room for four primary partitions, any extras must be extended.) I tell fdisk to make a new primary partition p. If fdisk prompts you for a partition number and this will be your first partition, press 1. Next fdisk will prompt you for your start sector, this is basically the place on the disk where the first partition will begin, the default is fine here [enter]. Fdisk will then prompt you for an end sector. There are two ways of specifying this, you can either do it using a cylinder number (hard) or an offset (easy) since we know how large we want this partition to be, we can just tell fdisk to make a 200mb partition. +200M. The disk should spin a little and you should be dumped back to the main menu. Continue this process and create the next three partitions:

swap Partition 2 (primary) size: 2 x {system ram}
root Partition 3 (primary) size: {3 - 10 gb}

If you got through all of that okay, then you are ready to go on to the next step. Right now if you list all of the partition types they will show as linux. However in order for the kernel to recognize the swap partition, we need to set its type as linux swap. Give the command to "change partition system id" (t on my implementation). Fdisk will prompt you for a partition number; if you followed my guidelines above, then press 2. You will then be prompted for a partition type, press L to list the partiton types, and type the number that appears beside Linux Swap.

Once you have given everything a look one last time, ensuring that every partition is properly sized and typed, it is time to make the changes on the disk. Give the command "write partition table to disk and exit" (w on my implementation). Fdisk will spit some stuff back, and then dump you to the console. You have just completed partitioning your system.



Kernel Issues:

Who is this kernel fellow?
The kernel, available from ftp.kernel.org via anonymous ftp, is the driving force behind any distribution of Linux. It acts as an interface to the hardware of the computer via system calls and devices. All interactions with the system are handled by the kernel, which acts as an I/O relay.

I need to recompile my kernel, how do I do it?
Many distributions package prebuilt kernels on their websites. If you have never compiled a kernel yourself, you should probably just install the one that your distribution provides. However, if you know for a fact that you must upgrade your kernel, or simply want to for :lol: fun then this will help you.



Hardware:

What hardware is supported?
Most modern hardware is supported to some extent or another by the Linux kernel. You should check with your vendor to see if your hardware is supported before installing. Also note that wireless support in Linux is very limited.

Is there a list of supported hardware?

Where can I get a 3d accelerated video driver for linux?
It may take a little digging around, but the two primary vendors have put out Linux drivers for their video cards. Below I have linked to pages where they may be found. Note that some of these drivers may require manual editing of configuration files and or recompiliation of the kernel.
Nvidia
ATI

I have heard that ATI drivers suck with linux, is this true?
Most ATI cards are supported to some extent or another. In general Nvidia has better support for graphics cards. Most modern video cards will run perfectly fine without 3d acceleration enabled. 3d support is dependant on the card.

This article is ©2008 by the respective authors. Reproduction is prohibited without express permission from all contributors.