Sunday, September 27, 2009

Linux Simplified, Introduction

You may have heard about Linux. Or not. Many people do not even know that free software exists, let alone a free operating system. They think that there must be a catch. Well, get ready for an eye opener.

Linux is free to use, to distribute and to modify. It is complete. You can get an operating system and all of the programmes that you would want (35,000 plus) without a cent changing hands.

It is colourful, attractive, up-to-date, fast, user friendly and best of all it is secure. You can actually run a computer and browse the internet without having any anti-virus or anti-malware software and have no worries. There are other advantages. It never needs to be re-booted if you don't want and there are no nags to worry about. The hard drive does not need to be defragmented and it can be encrypted for extra security. For those of you attached to Windows, you do not have to give it up. Linux can be installed to run alongside Windows, sharing your drive or even installed inside Windows like any other programme.

What is Linux?

Linux is often referred to as an operating system which serves as an alternative to Windows or OS/X. Strictly speaking it is not an operating system at all, but the kernel of the operating system. Linux is named in honour of its creator, Linus Torvalds, who still controls and maintains the kernel. Purists will tell you that what people call Linux should be called GNU/Linux. GNU is the other half of the equation. It represents the efforts of GNU which is associated with Richard Stallman (RMS) and the Free Software Foundation. They are responsible for many of the parts that make Linux. I, like most people, refer to it as Linux, just to keep it simple. No slight is intended for the GNU people.

Linux with GNU makes the core of the operating system. Historically there is animosity between these two parts because it began as a race to complete a free and open source operating system. Linus got there first and the rest is history. The fact that it is called Linux is a sore point for the GNU folks.

Linux operates under the GNU General Public License or GPL. It is free to use and modify and, boy, is it ever modified. There are over 300 different kinds of Linux and new ones come along each day. They are referred to as distributions or distros for short. Each distribution is really an operating system, but people generalize and refer to it all as Linux since they have the same kernel, structure and libraries. A good place to look at distributions is Distrowatch.org.

The most common distributions are Debian and Redhat. Debian has spawned many distributions including Ubuntu which is the largest distro. Ubuntu in turn has been spun off into dozens of distros such as Linux Mint. Redhat is used in business, but it has Fedora as its desktop equivalent and it has branched off into many distributions of its own such as Mandriva which in turn has given rise to PCLinuxOS. You get the idea. There is lots of variety and choice. There are more types of distributions than these. There is Slackware which is one of the oldest ones and Gentoo, for example. These are not newbie friendly and therefore are mentioned in passing.

Debian and Redhat distros use the same kernel and GNU parts, but differ chiefly in packaging. Debian has its own called Deb and Redhat uses RPM. Packaging is confusing for new users. It is essential to know what it is because that is how your applications are installed.

Windows has exe files. When you download a programme it is often an exe file format (or it may zipped with an exe inside). When you click on the exe the installer opens and the process begins.It is similar with Linux. When you click on a Deb file in a Debian-based system or an RPM in a Redhat-based distro, the package manager opens and the installation process begins.

There are couple of big differences. First we generally don't download Debs or RPMs. We get them from controlled sources that are maintained and secure called repositories. You can download Debs and RPMs but it causes problems which is the second big difference. Windows often has multiple instances of various libraries and things are kept straight in the registry. Linux has no registry which is both good and bad and only single instances of libraries are allowed. If you use the repositories they are all compatible, but if you go outside of the repositories where things are not as controlled then you run into compatibility problems or dependency errors. It is a good idea to only use the repositories until you are sure of what you are doing.

It is worth noting that while file suffixes exist in Linux, they are generally unnecessary. Linux recognizes that a jpeg is a jpeg without the .jpg suffix. Also there are few executable files in Linux and many files can be made to execute by changing the permissions. So if you wonder what the Linux equivalent to an exe or com file is, there really isn't one.

Repositories are maintained by the distribution and you can use them with confidence that they are free of viruses and malware and are meant to work with your version of their distribution. Often there are multiple versions of a distribution available to users at one time, especially for major distributions. One user may be using Ubuntu 8.04 LTS, another may be using 8.10 or 9.04. There are different versions for server and desktop and various architectures (64-bit and 32-bit processors) as well.

The variety does not stop there. Linux boasts a host of desktop environments, each of which give you a different look and feel. Windows in comparison has one desktop environment which is the familiar graphical user interface or GUI that people get with their version of Windows. All versions of Windows basically look the same at the time of installation.

Different Linux distributions use different desktop environments. There are a couple of big ones and many smaller ones. The two big ones are KDE and GNOME. They are full desktop environments with all of the bells and whistles that are feature for feature like Windows and arguably offer more. The lesser ones use fewer resources and are made to run fast and sleek at the cost of fewer frills. All offer an attractive GUI or graphical user interface with familiar desktops, panels, and icons that Windows users expect. Some of the less powerful and less resource hungry, but well known, desktop environments are XFCE, Fluxbox, and LXDE.

Ubuntu uses GNOME and Mandriva uses KDE. However you can get versions of Ubuntu with KDE. It is called Kubuntu. GNOME is the simpler user interface. It has two panels, one at the top and one at the bottom. The top one has a start button with menus and the bottom one shows what applications are running. KDE is more complex and more unified. KDE has one panel at the bottom with a menu in the expected place for Windows users. For this reason it is often said to be more Windows-like which is not really accurate.

KDE uses single mouse click by default and GNOME uses double mouse click. GNOME allows for you to put files on your desktop like in Windows, but KDE does not. Instead it uses plasmas as an intermediary. Any files on the desktop do not show unless you have a plasma or widget that displays the files on your desktop. It looks like a transparent window on your desktop.

Some users prefer the simplicity of GNOME while others love the look and sheer beauty of KDE. KDE is much more configurable and cohesive. The applications are made to blend together and work in unison. GNOME is more piecemeal, but simpler to use. Both are excellent and it is hard to choose between them. I use KDE mostly, but often run GNOME for variety. You can have as many desktop environments installed as you want and switch between them before you log in.

Linux is not Windows or OS/X. It is based on Unix which is older than DOS. OS/X is also based on Unix, but differs significantly from Linux in that it is proprietary ie. not free to distribute and not modifiable. Do not expect Linux to be like Windows. It uses a different file structure. There is no C drive. There is no central registry that can become fragmented and corrupted. All of these things are under the hood. When you load Linux it looks similar to both OS/X and Windows, but you need to remember that it is not either or you will become frustrated.

For example, Windows users are used to minimizing applications to the system tray. This is because Windows has only one desktop. When you click on the X of the application's taskbar in Linux it generally shuts the programme down.The reason is that Linux supports multiple or virtual desktops. Linux users do not minimize but switch to a new desktop. By default most desktop managers give you four desktops but you can run as many as you feel comfortable with. This may frustrate you at first because you are thinking like a Windows user. You need to start thinking like a Linux user to be successful.

Linux also will not run Windows programmes. It has its own programmes. Some are better than the ones you are used to and some are not as good. However, many Windows programmes can be made to run in Linux using a compatibility layer called Wine. This is not a sure thing. Many Linux users dual boot if they need Windows or run Windows in a virtual machine from Linux.

Your biggest challenge and the one that will determine your level of satisfaction with Linux is to choose the right distribution, so this is where we will begin next time.