Difference between revisions of "Getting Started With Linux"

From PHYSpedia
Jump to: navigation, search
(Installing Ubuntu (on a Virtual Machine))
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Installation==
+
=Installation=
 
==32-bit vs. 64-bit==
 
==32-bit vs. 64-bit==
 
Processors in new computers are "64-bit". This has to do with how the processor processes instructions, so programs that have been compiled for 64-bit processors will not run on old 32-bit processors. However, the new processors are "backward compatible", meaning they can run programs compiled for 32-bit processors. Even though 64-bit processors have been available for several years now, many computers come with a 32-bit version of Microsoft Windows installed. When a 32-bit OS is installed on a 64-bit processor, the computer will only be able to run 32-bit programs, even though the processor is cable of running 64-bit programs. So, there are three parts when considering 32-bit vs. 64-bit
 
Processors in new computers are "64-bit". This has to do with how the processor processes instructions, so programs that have been compiled for 64-bit processors will not run on old 32-bit processors. However, the new processors are "backward compatible", meaning they can run programs compiled for 32-bit processors. Even though 64-bit processors have been available for several years now, many computers come with a 32-bit version of Microsoft Windows installed. When a 32-bit OS is installed on a 64-bit processor, the computer will only be able to run 32-bit programs, even though the processor is cable of running 64-bit programs. So, there are three parts when considering 32-bit vs. 64-bit
Line 7: Line 7:
 
If any item in this list is 32-bit, then all the items below it are limited to 32-bit. So, in order to run a 64-bit program on your computer, you must have a 64-bit processor AND a 64-bit operating system.
 
If any item in this list is 32-bit, then all the items below it are limited to 32-bit. So, in order to run a 64-bit program on your computer, you must have a 64-bit processor AND a 64-bit operating system.
  
===Installing on a Virtual Machine===
+
==Installing on a Virtual Machine==
 
This is the simplest way to start using Linux without losing anything on your current computer setup. A VirtualBox is a program that emulates a PC (i.e. a virtual machine), which you can then install an operating system on. To Install Linux on a virtual machine, you need to
 
This is the simplest way to start using Linux without losing anything on your current computer setup. A VirtualBox is a program that emulates a PC (i.e. a virtual machine), which you can then install an operating system on. To Install Linux on a virtual machine, you need to
 
# install VirtualBox on your computer
 
# install VirtualBox on your computer
Line 22: Line 22:
 
Again, if any item in the list is 32-bit, then all items below it will be limited to 32-bit.
 
Again, if any item in the list is 32-bit, then all items below it will be limited to 32-bit.
  
Even though 64-bit processors have been available for a while, virtualizing 64-bit processors is fairly new. Not all 64-bit computers will be able to run a 64-bit virtual machine. For this tutorial, we will assume that we want to install a 32-bit version of Linux on a 32-bit virtual machine. This is the most portable setup since both 32-bit and 64-bit computers running 32-bit or 64-bit operating systems and 32-bit or 64-bit version of VirtualBox can all run 32-bit virtual machines.
+
Even though 64-bit processors have been available for a while, virtualizing 64-bit processors is fairly new. Not all 64-bit computers will be able to run a 64-bit virtual machine. For this tutorial, we will assume that you want to install a 32-bit version of Linux on a 32-bit virtual machine. This is the most portable setup since both 32-bit and 64-bit computers running 32-bit or 64-bit operating systems and 32-bit or 64-bit version of VirtualBox can all run 32-bit virtual machines.
 
====Installing VirtualBox====
 
====Installing VirtualBox====
 +
For more information on VirtualBox, visit their website at [http://www.virtualbox.org www.virtualbox.org].
 +
 +
To install VirtualBox:
 +
# go to the [http://www.virtualbox.org/wiki/Downloads downloads page here]
 +
# choose the download for your platform (Windows, OS X, or Linux) from the "VirtualBox platform packages" section.
 +
# run the installer that was downloaded
 +
# just accept the default configuration by clicking "Next >" on the install wizard window (unless you know what you are doing)
 +
# during the install, you may be asked if you want to install various "devices" from Oracle. click "Install" on these dialog boxes
 +
 +
===Creating a Linux Virtual Machine===
 +
You are now ready to create a virtual machine and install Linux on it. Start VirtualBox, a window titled "Oracle VM VirtualBox Manager" should appear. When creating a new virtual machine, you will choose
 +
* how much memory (RAM) the machine will have
 +
* how big the harddrive (storage) will be
 +
 +
 +
To create a new virtual machine for your Linux install:
 +
# click on the "New" button
 +
# In the "Name and operating system" window
 +
## enter a name for your new virtual machine
 +
## in the "Type" field, choose "Linux"
 +
## in the "Version" field, choose "Ubuntu" (not "Ubuntu (64 bit)")
 +
## click "Next >"
 +
# In the "Memory size" window
 +
## choose the amount of memory for your virtual machine (512 - 1024 MB should be enough)
 +
## click "Next >"
 +
# In the "Hard drive" window
 +
## select "Create a virtual hard drive now"
 +
## click "Create"
 +
# In the "Hard drive file type" window
 +
## select "VDI (VirtualBox Disk Image)"
 +
## click "Next >"
 +
# In the "Storage on physical hard drive" window
 +
## select Dynamically allocated
 +
## click "Next >"
 +
# In the "File location and size" window
 +
## the name you chose for your virtual machine should be automatically inserted for the virtual hard drive's name. if not, name the hard drive
 +
## choose a size for the hard drive. you should make the hard drive at least 10 GB. if you have room on your physical hard drive, make the virtual hard drive 40 GB
 +
## click "Create"
 +
 +
You should now see your virtual machine listed in left-hand pane. To the right, you will see various information about the machine.
 +
 +
===Installing Ubuntu (on a Virtual Machine)===
 +
Installing Ubuntu on a virtual machine is essentially the same as installing it on a regular computer. The only difference is how you load the install CD. ''NOTE: Ubuntu 12.10 requires 3D acceleration, which may not be supported by VirtualBox running on your computer. It is suggested that you install '''Ubuntu 12.04 LTS''' on your virtual machine''.
 +
 +
To install Ubuntu on your virtual machine
 +
# Download an Ubuntu install CD image (see [[#Downloading an installation image]]).
 +
# Open VirtualBox and select the virtual machine you want to install Ubuntu on.
 +
# Insert the Ubuntu install CD into the virtual machine.
 +
## On the right-hand side of the window, you should see a section named "Storeage". Click on the title "Storage".
 +
## In the "Storage" window, you should see a section called "Storage Tree" with a couple of entries. One should say "Controller: IDE" and should have a picture of a CD below it. Click on the picture of the CD.
 +
## To the right, a drop-down box for "CD/DVD Drive:" should appear. This box has another picture of a CD to the right of it. Click on the picture of the CD.
 +
## In the menu that pops up, select "Choose a virtual CD/DVD disk file..."
 +
## In the file browser that opens, navigate to the folder that the Ubuntu .iso file was saved and select the .iso file.
 +
## The Ubuntu install CD has now been "inserted" into the virtual machine's CD drive.
 +
## Click "OK" in the "Storage" window to close it.
 +
# Boot the virtual machine by clicking the "Start" button.
 +
# The installation will now be the same as the installation on a real computer (see [[#Running the Installer]])
 +
 +
After you install Ubuntu on your virtual machine, the first thing you will probably want to do is install the "VirtualBox Guest Additions". This is a package that you install ''on your Ubuntu guest'' that allows adds functionality to your guest system that makes working with it easier. Ubuntu may automatically ask you if you want to install Guest Additions when you boot into it for the first time. If you see a green icon at the top of the desktop (it looks like some sort of PCI card), click on it. It will open up a window that asks if you want to active the VirtualBox Guest Additions driver. Click activate and enter you password. When you reboot, you should be able to use the Guest Additions (you screen size will be much bigger for example).
 +
 +
[[File:First_Boot_Step_1.png|600px|border|Click on the green icon near the upper right corner]]
 +
Click on the green icon near the upper right corner
 +
 +
[[File:First_Boot_Step_2.png|600px|border|Click "Activate" to activate the guest additions drivers]]
 +
Click "Activate" to activate the guest additions drivers
 +
 +
[[File:First_Boot_Step_3.png|600px|border|Enter your password and click "Authenticate"]]
 +
Enter your password and click "Authenticate"
 +
 +
==Installing Ubuntu==
 +
Ubuntu is a popular Linux distribution that has very good community support. When Ubuntu arrived, it made a name for itself by providing good hardware support (so that all devices on your computer "just worked") and an easy graphical installer. Today, Ubuntu is easier to install than ever. To install Ubuntu, you must first download an installation CD image. This is a *.iso file that can be burned to a bootable CD. To learn more about Ubuntu, visit the official website at [http://www.ubuntu.com www.ubuntu.com]. Installation images can be found on the Ubuntu download page [http://www.ubuntu.com/download/desktop here].
 +
 +
Ubuntu releases two types of distributions. A "Regular" release, which contains all of the latest software and features, and a "Long Term Support (LTS)" release. The difference between these two has to do with how long Ubuntu will "support" these releases by means of packages updates for bug fixes and system stability. Using the regular Ubuntu release will allow you to experiment with the latest software, however, when new versions of Ubuntu are releases you will have to "upgrade" to continue receiving support. The LTS release will be supported longer. This would be important, for example, to somebody who was installing Ubuntu on a web server and would not want to upgrade the server every year.
 +
 +
If you are just getting started using Linux, download the regular release.
 +
 +
===Downloading an installation image===
 +
The latest version of Ubuntu will be available to download at the top of the page. Select "32 bit (recommended)" from teh "Choose your flavour" drop-down box and click "Get Ubuntu". You may be directed to a page asking for a donation to the Ubuntu project. A link at the bottom that says "Not now, take me to the download>" will skip this page. This should start downloading a .iso file. For example, the 32-bit version of Ubuntu 12.10 will download a file named "ubuntu-12.10-desktop-i386.iso"
 +
 +
===Running the Installer===
 +
Once you have an installation CD, insert it into your computer's CD drive and boot/reboot the computer. During the install process, Ubuntu will download package updates from the internet, so you will need an internet connection. If you are installing Ubuntu on a laptop, it is also a good idea to plug the laptop in so that it does not die during the installation.
 +
 +
To install Ubuntu on '''a new computer, or a computer that has no data you want saved'''
 +
# Start your computer with the install CD inserted into the CD drive
 +
# In the "Welcome window that appears after the CD boots
 +
## Select your language from the list on the left
 +
## Click on the "Install Ubuntu" button
 +
# In the "Preparing to install Ubuntu" window
 +
## Make sure the installer requirements are met (plugged in to power source, connected to the internet)
 +
## Check the "Download updates while installing" box
 +
## Check the "Install this third-party software" box
 +
## Click "Continue"
 +
# In the "Installation type" window
 +
## Select "Erase disk and install Ubuntu"
 +
## Click "Continue"
 +
## If an "Erase disk and install Ubuntu" window pops up, Click "Install Now"
 +
# In the "Where are you?" window
 +
## Select a location in the same timezone as you. Chicago will work for central time.
 +
## Click "Continue"
 +
# In the "Keyboard layout" window
 +
## Select your keyboard layout. If you don't know what this is, then the default (English (US)) is probably the right choice.
 +
## Click "Continue"
 +
# In the "Who are you?" window
 +
## Type in your name
 +
## Choose and enter a name for your computer (don't use spaces in this name)
 +
## Choose and enter a user name (this will be the name you log in with, it should not contain spaces)
 +
## Choose and enter a password (do not forget this)
 +
## Confirm your password
 +
## Select "Log in automatically" if you would like the computer to boot straight into the desktop without typing in your password
 +
## Click "Continue"
 +
# In the "Installation Complete" window
 +
## Click "Restart Now"
 +
# When your computer reboots, you will have a working Ubuntu installation

Latest revision as of 13:11, 21 January 2013

Installation

32-bit vs. 64-bit

Processors in new computers are "64-bit". This has to do with how the processor processes instructions, so programs that have been compiled for 64-bit processors will not run on old 32-bit processors. However, the new processors are "backward compatible", meaning they can run programs compiled for 32-bit processors. Even though 64-bit processors have been available for several years now, many computers come with a 32-bit version of Microsoft Windows installed. When a 32-bit OS is installed on a 64-bit processor, the computer will only be able to run 32-bit programs, even though the processor is cable of running 64-bit programs. So, there are three parts when considering 32-bit vs. 64-bit

  • The computer's processor (hardware)
  • The computer's operating system (software)
  • The program to run (software)

If any item in this list is 32-bit, then all the items below it are limited to 32-bit. So, in order to run a 64-bit program on your computer, you must have a 64-bit processor AND a 64-bit operating system.

Installing on a Virtual Machine

This is the simplest way to start using Linux without losing anything on your current computer setup. A VirtualBox is a program that emulates a PC (i.e. a virtual machine), which you can then install an operating system on. To Install Linux on a virtual machine, you need to

  1. install VirtualBox on your computer
  2. create a new virtual machine in VirtualBox
  3. install Linux on the new virtual machine

When installing a virtual machine, the computer you install VirtualBox on is called the HOST (this is the actual, physical computer you can put your hands on). The virtual machine you create and install Linux on is called the GUEST. The question of 32-bit vs. 64-bit comes into play here again, but it is slightly more complicated because now we have both the host and guest to consider. The parts involved are

  • Host's processor (hardware)
  • Host's OS (software)
  • VirtualBox Install (software)
  • Guest's processor (virtual hardware)
  • Guest's OS (software)
  • The program to run (software)

Again, if any item in the list is 32-bit, then all items below it will be limited to 32-bit.

Even though 64-bit processors have been available for a while, virtualizing 64-bit processors is fairly new. Not all 64-bit computers will be able to run a 64-bit virtual machine. For this tutorial, we will assume that you want to install a 32-bit version of Linux on a 32-bit virtual machine. This is the most portable setup since both 32-bit and 64-bit computers running 32-bit or 64-bit operating systems and 32-bit or 64-bit version of VirtualBox can all run 32-bit virtual machines.

Installing VirtualBox

For more information on VirtualBox, visit their website at www.virtualbox.org.

To install VirtualBox:

  1. go to the downloads page here
  2. choose the download for your platform (Windows, OS X, or Linux) from the "VirtualBox platform packages" section.
  3. run the installer that was downloaded
  4. just accept the default configuration by clicking "Next >" on the install wizard window (unless you know what you are doing)
  5. during the install, you may be asked if you want to install various "devices" from Oracle. click "Install" on these dialog boxes

Creating a Linux Virtual Machine

You are now ready to create a virtual machine and install Linux on it. Start VirtualBox, a window titled "Oracle VM VirtualBox Manager" should appear. When creating a new virtual machine, you will choose

  • how much memory (RAM) the machine will have
  • how big the harddrive (storage) will be


To create a new virtual machine for your Linux install:

  1. click on the "New" button
  2. In the "Name and operating system" window
    1. enter a name for your new virtual machine
    2. in the "Type" field, choose "Linux"
    3. in the "Version" field, choose "Ubuntu" (not "Ubuntu (64 bit)")
    4. click "Next >"
  3. In the "Memory size" window
    1. choose the amount of memory for your virtual machine (512 - 1024 MB should be enough)
    2. click "Next >"
  4. In the "Hard drive" window
    1. select "Create a virtual hard drive now"
    2. click "Create"
  5. In the "Hard drive file type" window
    1. select "VDI (VirtualBox Disk Image)"
    2. click "Next >"
  6. In the "Storage on physical hard drive" window
    1. select Dynamically allocated
    2. click "Next >"
  7. In the "File location and size" window
    1. the name you chose for your virtual machine should be automatically inserted for the virtual hard drive's name. if not, name the hard drive
    2. choose a size for the hard drive. you should make the hard drive at least 10 GB. if you have room on your physical hard drive, make the virtual hard drive 40 GB
    3. click "Create"

You should now see your virtual machine listed in left-hand pane. To the right, you will see various information about the machine.

Installing Ubuntu (on a Virtual Machine)

Installing Ubuntu on a virtual machine is essentially the same as installing it on a regular computer. The only difference is how you load the install CD. NOTE: Ubuntu 12.10 requires 3D acceleration, which may not be supported by VirtualBox running on your computer. It is suggested that you install Ubuntu 12.04 LTS on your virtual machine.

To install Ubuntu on your virtual machine

  1. Download an Ubuntu install CD image (see #Downloading an installation image).
  2. Open VirtualBox and select the virtual machine you want to install Ubuntu on.
  3. Insert the Ubuntu install CD into the virtual machine.
    1. On the right-hand side of the window, you should see a section named "Storeage". Click on the title "Storage".
    2. In the "Storage" window, you should see a section called "Storage Tree" with a couple of entries. One should say "Controller: IDE" and should have a picture of a CD below it. Click on the picture of the CD.
    3. To the right, a drop-down box for "CD/DVD Drive:" should appear. This box has another picture of a CD to the right of it. Click on the picture of the CD.
    4. In the menu that pops up, select "Choose a virtual CD/DVD disk file..."
    5. In the file browser that opens, navigate to the folder that the Ubuntu .iso file was saved and select the .iso file.
    6. The Ubuntu install CD has now been "inserted" into the virtual machine's CD drive.
    7. Click "OK" in the "Storage" window to close it.
  4. Boot the virtual machine by clicking the "Start" button.
  5. The installation will now be the same as the installation on a real computer (see #Running the Installer)

After you install Ubuntu on your virtual machine, the first thing you will probably want to do is install the "VirtualBox Guest Additions". This is a package that you install on your Ubuntu guest that allows adds functionality to your guest system that makes working with it easier. Ubuntu may automatically ask you if you want to install Guest Additions when you boot into it for the first time. If you see a green icon at the top of the desktop (it looks like some sort of PCI card), click on it. It will open up a window that asks if you want to active the VirtualBox Guest Additions driver. Click activate and enter you password. When you reboot, you should be able to use the Guest Additions (you screen size will be much bigger for example).

Click on the green icon near the upper right corner Click on the green icon near the upper right corner

Click "Activate" to activate the guest additions drivers Click "Activate" to activate the guest additions drivers

Enter your password and click "Authenticate" Enter your password and click "Authenticate"

Installing Ubuntu

Ubuntu is a popular Linux distribution that has very good community support. When Ubuntu arrived, it made a name for itself by providing good hardware support (so that all devices on your computer "just worked") and an easy graphical installer. Today, Ubuntu is easier to install than ever. To install Ubuntu, you must first download an installation CD image. This is a *.iso file that can be burned to a bootable CD. To learn more about Ubuntu, visit the official website at www.ubuntu.com. Installation images can be found on the Ubuntu download page here.

Ubuntu releases two types of distributions. A "Regular" release, which contains all of the latest software and features, and a "Long Term Support (LTS)" release. The difference between these two has to do with how long Ubuntu will "support" these releases by means of packages updates for bug fixes and system stability. Using the regular Ubuntu release will allow you to experiment with the latest software, however, when new versions of Ubuntu are releases you will have to "upgrade" to continue receiving support. The LTS release will be supported longer. This would be important, for example, to somebody who was installing Ubuntu on a web server and would not want to upgrade the server every year.

If you are just getting started using Linux, download the regular release.

Downloading an installation image

The latest version of Ubuntu will be available to download at the top of the page. Select "32 bit (recommended)" from teh "Choose your flavour" drop-down box and click "Get Ubuntu". You may be directed to a page asking for a donation to the Ubuntu project. A link at the bottom that says "Not now, take me to the download>" will skip this page. This should start downloading a .iso file. For example, the 32-bit version of Ubuntu 12.10 will download a file named "ubuntu-12.10-desktop-i386.iso"

Running the Installer

Once you have an installation CD, insert it into your computer's CD drive and boot/reboot the computer. During the install process, Ubuntu will download package updates from the internet, so you will need an internet connection. If you are installing Ubuntu on a laptop, it is also a good idea to plug the laptop in so that it does not die during the installation.

To install Ubuntu on a new computer, or a computer that has no data you want saved

  1. Start your computer with the install CD inserted into the CD drive
  2. In the "Welcome window that appears after the CD boots
    1. Select your language from the list on the left
    2. Click on the "Install Ubuntu" button
  3. In the "Preparing to install Ubuntu" window
    1. Make sure the installer requirements are met (plugged in to power source, connected to the internet)
    2. Check the "Download updates while installing" box
    3. Check the "Install this third-party software" box
    4. Click "Continue"
  4. In the "Installation type" window
    1. Select "Erase disk and install Ubuntu"
    2. Click "Continue"
    3. If an "Erase disk and install Ubuntu" window pops up, Click "Install Now"
  5. In the "Where are you?" window
    1. Select a location in the same timezone as you. Chicago will work for central time.
    2. Click "Continue"
  6. In the "Keyboard layout" window
    1. Select your keyboard layout. If you don't know what this is, then the default (English (US)) is probably the right choice.
    2. Click "Continue"
  7. In the "Who are you?" window
    1. Type in your name
    2. Choose and enter a name for your computer (don't use spaces in this name)
    3. Choose and enter a user name (this will be the name you log in with, it should not contain spaces)
    4. Choose and enter a password (do not forget this)
    5. Confirm your password
    6. Select "Log in automatically" if you would like the computer to boot straight into the desktop without typing in your password
    7. Click "Continue"
  8. In the "Installation Complete" window
    1. Click "Restart Now"
  9. When your computer reboots, you will have a working Ubuntu installation