GNU/Linux Information

Preface

This document gives some very basic information about getting GNU/Linux running on your computer.  It was written by Jim Diamond with assistance (a long time ago now) from Rick Giles, but any errors are my (JD's) responsibility alone.  If you find any errors or have suggestions to improve the content please e-mail me at Jim.Diamond@AcadiaU.ca.

In order to keep this document relatively brief, the details and background information are minimal.  If you are unable to install Linux with the aid of this document, on-line documentation and help forums, you can wait until you are on campus in the first week of classes, when assistance is available. 

Background

Linux is an alternative operating system which runs on many different types of computer platforms.  (Many people argue that, strictly speaking, it should be called called "GNU/Linux" since the Linux kernel would be of no real use to you without the GNU suite of system and application programs.  However, it is usually and somewhat erroneously referred to as just "Linux", as I will do from here on down.)

The vast majority of software for Linux is available free-of-charge; further, source code is available for almost all of that software, in case you wish to study or improve it.

Linux is a clone of Unix, commercial software which has been used in government, industry and academia for over forty years.  Of course, over that time the idea of what "Unix" is has evolved considerably, as new technology was introduced.  For example, Unix pre-dates the internet, although even in the 1970's it had the capability to share files and send e-mail between computers via dial-up phone lines.

Unlike commercial operating systems where you normally have only one choice of user interface, there are many choices available for Linux.  You might choose to pick a so-called "desktop environment" similar to the one you already use, or you might choose one considerably different.  This aspect is discussed further below.

Linux Distributions

As mentioned above, aside from the Linux "kernel" itself, a functional Linux system comes with a wide array of programs.  Some of these programs are mainly for system configuration and administration purposes, and others are "end-user" applications such as web browsers, e-mail programs, text editors, and so on.

For most program categories there are many (more or less equivalent) alternatives.  It is not practical for you to have all possible choices installed on your computer, and too much choice tends to confound novice users.  Instead, various groups of people select (hopefully) coherent collections of programs and bundle them together; such bundles are called Linux distributions.

There are many Linux distributions to choose from; in fact, some people think there are too many.  However, since the licenses for the Linux kernel and the GNU (and other) programs don't prohibit people from creating their own distributions, there are many distributions to choose from.  Some of these distributions come with commercial (i.e., "paid-for") support, and others are provided on a "if you want to use it, go ahead" basis.  In both cases, at least for the popular distributions, there are newsgroups and/or web forums where you can go to get free help.

I (Jim Diamond) use the Slackware distribution.  Setting up and using Slackware requires you to know (or learn) a bit more about Linux than some other distributions; for people completely unfamiliar with Unix or Linux, Slackware's learning curve will be quite steep at the beginning.  If you know nothing about Unix or Linux and need instant gratification this is probably not the best choice.  If you want to take the easy, well-worn path, go with one of the suggestions in the next section.

Ubuntu

A number of years ago a South African billionaire decided to put some significant financial resources into creating Linux distributions suitable for novice Linux users.  Part of the idea was to make a system which was relatively easy to set up, even for non-Linux, non-Unix users.  There is commercial support available for these distributions, but because of their popularity there is also extensive free help available via on-line documents and web forums.  For simplicity, each of these distributions had just one choice of desktop environment included by default (although it is relatively easy to add various other desktop environments as well).

The original distribution produced from the effort is known as "Ubuntu".  ("Ubuntu" is an African word sometimes translated into English as "humanity towards others".)  Ubuntu used to use the gnome desktop, along with a suite of programs which are designed to work well together with gnome.  (Regrettably, as of Ubuntu 11.04, the default desktop environment was changed to "Unity".  The original version of Unity was designed for netbook computers (i.e., computers with very small amounts of screen real-estate), and, in my (JD's) opinion, it was far inferior to gnome for anyone except users who wish to remain novices forever.  In the last couple of years Unity has changed considerably and reportedly is much better now, but I (JD) have not tried it recently.)

Three distributions related to Ubuntu are:

  1. Kubuntu, based on the K Desktop Environment (KDE), along with KDE's associated suite of programs.
  2. Xubuntu, based on the Xfce desktop environment, along with its associated suite of programs.
  3. Lubuntu, which uses LXDE (the Lightweight X11 Desktop Environment), along with its associated suite of programs.  (This distribution is designed to be usable on less powerful computers, not that I recommend you try to get through COMP 2103 (or any other CS course) with an old and tired computer.)

Each of these distributions are updated twice yearly (usually April and October).  For example, Ubuntu 17.04 was released April 13, 2017.  Aside from these numerical names, there are corresponding "code names"; Ubuntu 17.04 is also known as "Zesty Zapus", and the more recent 17.10 has the code name "Artful Aardvark".  Finally, some Ubuntu distributions are designated as "long-term support" (LTS), which means that security updates will be provided for longer than for non-LTS Ubuntu distributions.  For example, Ubuntu 16.04 ("Xenial Xerus") will be supported for five years.  (In fact, when I wrote this, 16.04 had been replaced by 16.04.3, and if you choose to install 16.04, look for the .3 update (or newer yet, depending on what happens between the moment this was written and when you look for it).)

Note that there are two versions of each of Ubuntu, Kubuntu, Lubuntu and Xubuntu available: 32-bit, suitable for older computers, and 64-bit, suitable for most newer computers.  If you are unsure, try out the 64-bit version (see "Installation" below) and see how it goes.  (If you try to install the 64-bit version on a 32-bit computer, it will let you know that you can't do that.)  On a 64-bit computer the 64-bit version should give you better performance (especially if you have more than 4 GB of RAM), but for most day-to-day activities you might not see much of a difference.

In summary, if you have no idea which Linux distribution to choose, I recommend you choose Xubuntu 17.10 (or newer) as your first Linux distribution.  A quick web search (e.g., "download Xubuntu" will direct you to the appropriate web site (this one).  If you choose Ubuntu (as opposed to one of the other three flavours), note that as of Ubuntu 11.10 (or was it 12.04?), you will have to do a small bit of work to install the gnome interface (search the web!).  For this reason I recommend that novice users choose Xubuntu.  The slightly more adventurous may want to consider installing the "Mate" desktop on top of Ubuntu 17.10; there are many web sites which describe how to do this. 

You are, of course, free to try out any Linux distribution you wish.  While the standard "Unix" tools which we will be using in COMP 2103 are essentially the same on virtually all Linux distributions, the configuration of the user interface and the choice of distribution-specific configuration tools varies from one distribution to the next.  While I can try to help you work through issues even on a distribution I've never used, I can't guarantee help for distribution-specific issues in any timely manner.  Therefore, the "safe" approach is to go with some Ubuntu distribution, and of those I am more familiar with Xubuntu than the others. 

Installation

Having chosen a Linux distribution, you must next decide how to install it on your computer. There are two fundamental options:

In either case, you will need to download a .iso file of the Linux distribution of your choice.  You can obtain Xubuntu 17.10 here by clicking on the "Canada" direct download link and choosing xubuntu-17.10-desktop-amd64.iso (choose the "i386" version if you have a 32-bit computer).  This is a big file (about 1 GB): don't do it over a slow connection.

(1) Virtual Machine — The "learn as little as possible" Approach

Virtual Machine (VM) technology allows you to run a second operating system (a "guest") on your computer at the same time as you are running your regular operating system (the "host"). As far as the host operating system is concerned (more or less), the virtual machine is just another program running on your computer.  As far as the guest operating system is concerned, it doesn't know that it is running inside a program on your host operating system (that isn't completely accurate, but for now it will have to do).

There are a variety of virtual machine programs you can get, but I recommend "VirtualBox" (often called "vbox" for short), which is free.  You can download the correct version for your operating system and then install it like any other program.  Having done that, start it up, tell it to create a new machine, and go through the dialogs.  (You will need to decide how much disk space to save for Linux, and I would suggest 50 GB if you have that much free space; this amount is way more than you need to get started, but if you use Linux a lot you may end up installing all sorts of other free software, which will eat up your disk.)  At some point it will give you the opportunity to insert the .iso file you downloaded into the virtual optical drive, and when you ask vbox to start your operating system, it will load it from that file.

If you succeed with running your chosen Linux inside the VM, it will guide you through the installation process (which should be pretty easy).  After installation is complete, ensure that you eject the "installation CD" (i.e., the .iso file) from the virtual optical drive.  Then boot the Linux virtual machine and ensure that you can log in to the account you created, and ensure that you can access the internet (for example, via a web browser).  If you have any problems, there is plenty of help to be found at either VirtualBox's web site or at the Ubuntu help forums.

One problem with using a VM is that the client system runs somewhat sluggishly compared to running the system in the usual manner; not only may you find this somewhat frustrating, but you may develop incorrect opinions on the speed of the client system.  However, if you have a blindingly fast laptop with lots of memory, you may not notice this problem.

I (JD) have been using VirtualBox now for a few years to run other OSes on a Linux host, and I have found VirtualBox to be a very solid product for quite a number of years; I've heard that it works as well on other host OSes.  A minor problem is that accessing devices (such as USB devices) requires you to do a bit of extra work; specifically, VirtualBox has a menu item which you can select to assign (or unassign) a USB device to (or from) VirtualBox.  Finally, some of the operating system information we shall look at in COMP 2103 may not be available inside a virtual machine.  In summary, for the purposes of COMP 2103 I strongly advise against running Linux as a virtual machine from within OS X or MS-windows, and I can't promise there won't be assignments which are hard or impossible to do inside a VM.

(2) Installing Linux to Your Disk Drive — The "learn a lot" Approach

NOTE!!!  If you make a (big) mistake here, you can lose your files (and the operating system installation) on your disk drive.  (I know of only one student who did that, but sooner or later there will be a second accident.)  Consequently, you must back up your files onto an external disk drive or another computer before starting this installation procedure.

You will need to copy the .iso file you downloaded onto a sufficiently-large USB memory stick.  This procedure will clobber the files you have on the USB stick, so copy them to another computer (or get yourself a new, empty USB stick).  To copy the .iso to the USB stick, you can follow the directions given here for windows users or here for macos users.

In the discussion below, whenever I say "disk drive", if your computer has flash memory, just think "flash memory".

Neither Apple nor Microsoft are happy about you installing Linux on your computer.  Apple uses non-standard hardware to make your life a bit difficult.  Microsoft has (effectively) convinced hardware manufacturers to implement "secure boot"; if you have secure boot turned on, the hardware will only boot operating systems with appropriate cryptographic credentials.  Fortunately, Ubuntu has paid the ransom money to obtain such credentials, which is another reason for installing one of the Ubuntus rather than another Linux distribution.  (Alternatively, on a "PC" you can probably turn secure boot off via the hardware ("UEFI") configuration tool, but then Windows might not boot, which, curiously, you might consider to be a problem.) 

PC Hardware: Installing Linux into its Own Partitions

Normally when you buy a new computer, either the entire disk drive is devoted to the pre-installed operating system, or the disk drive is divided into two to four so-called "partitions".  In the latter case the pre-installed operating system will be resident in a partition which occupies most of the disk, with the remaining space in the other partition(s) used for such things as "system diagnostic" and/or "system recovery" tools.

To install Linux on a "PC" you can either

  1. entirely remove MS-windows from your disk and install Linux on the whole thing (which many of you won't be willing to do, even though it would improve your life); or
    1. use a tool to shrink the MS-windows partition on your disk drive (such tools come for free with many/most versions of Linux),
    2. divide the resulting free disk space into two (or more, if you want) disk partitions, and
    3. install Linux onto those additional disk partitions.

Most Linux distributions, including the Ubuntus, guide you through the disk partitioning process, so you don't actually need to learn much about this.  (Having said that, if you are planning a career in some field related to computer science, understanding the idea of what disk partitioning is, and knowing how to partition a disk is valuable knowledge.)  In particular, the Ubuntu/Xubuntu installation procedure asks you which of those choices you like, and if you want to sub-divide the MS-windows partition you will get to choose how much space to allocate to Linux.  The (Ubuntu or Xubuntu or …) installation procedure then shrinks the MS-windows partition and prepares the newly-freed space for the actual installation of Linux.  (Of course, for this to work you need free space on the MS-windows partition!)

Note that different Linux distributions require different amounts of space, but I would recommend that for Ubuntu or Xubuntu you allocate at least 50 GB of a 300 GB disk.  This should give you plenty of room for your coursework and additional software you might decide to download and install.  For newer laptops with larger disks, you could allocate even more, if you wish.

Aside from the disk partition containing the system and user files, most Linux distributions will create a "swap" partition.  This is (essentially) an extension of the PC's main memory onto the disk drive (advertisement: take COMP 3713 to find out more).  Allocating 2 or 3 GB for this should be plenty, unless you end up doing some unusually memory-intensive tasks with your computer.

Experienced users often use two (or more) disk partitions for their files.  For example, you could create a partition for all of the system files, and a second partition for all the user files (which "live" in the "/home" file system).  Allocating more than one partition for file space requires a bit more thinking about how much space to allocate to each one; 15 GB should be enough for the system file partition for 99% of (X)Ubuntu users, but if you have a huge disk you could be really safe and allocate 20 GB (or more).

Apple Hardware: Installing Linux into its Own Partitions

If you have a MacBook, the procedure is a bit different, since you may want to "dual-boot" your Mac with OS X and Linux (or "triple-boot" with OS X, Linux, and MS-windows).  Further, Apple's pathological need to be different for the sake of being different means the computer's UEFI (the modern replacement for the historic PC "BIOS") doesn't follow industry standards.

Rather than copying information directly from the internet, I'll let you read this and follow the directions. If you want to read a bit more before starting, you might want to do a web search with the phrase "how do I install ubuntu on a macbook" and read a few of the top hits before you start.  If you find a document that you think is particularly good please let me know and I will add a link to it here.

I recently installed Linux on a macbook pro by replacing Apple's boot program with one called refind, which is mentioned above.  Fortunately, recent versions of Ubuntu help you through with a lot of this procedure.

 

Prepared by J. Diamond. Last updated 2018-01-01.
Former versions of this document contained contributions by Dr. Rick Giles, but over the course of time these parts have become outdated.  Nonetheless, I continue to appreciate his efforts which live on here.


Valid CSS! Valid XHTML 1.0 Strict