Difference between revisions of "Tutorial7: Installing Linux / Live Linux / Virtualization"

From CDOT Wiki
Jump to: navigation, search
(Linux Installation Methods)
(30 intermediate revisions by the same user not shown)
Line 52: Line 52:
  
 
[[Image:distro-1.png|thumb|right|450px|Listing of Common Linux Distributions.<br>(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]
 
[[Image:distro-1.png|thumb|right|450px|Listing of Common Linux Distributions.<br>(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]
''A '''Linux distribution''' (often abbreviated as distro) is an operating system made from a software collection that is based upon the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices (for example, OpenWrt) and personal computers (for example, Linux Mint) to powerful supercomputers (for example, Rocks Cluster Distribution).''
+
''A '''Linux distribution''' (often abbreviated as distro) is an operating system made from a software collection that is based upon the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems...''
  
 
Reference: https://en.wikipedia.org/wiki/Linux_distribution
 
Reference: https://en.wikipedia.org/wiki/Linux_distribution
Line 59: Line 59:
 
''Steps in the Linux Installation Process:''
 
''Steps in the Linux Installation Process:''
  
* '''Select a Linux Distribution''' and '''download''' a Linux Distribution Install '''ISO''' file<br>to your Computer ('''Note:''' Be aware of any required Hardware Requirements for the Linux OS prior to installation.)
+
* '''Select''' a ''Linux Distribution'' to '''download''' (ISO image file or VM file).  
* '''Burn an Linux Distribution CD/DVD''', or '''USB''', or use '''downloaded file when creating a virtual machine'''.
+
* '''Create''' VM and '''install''' Linux Distribution or '''run''' VM file.
* Once booted, the installation process '''transfers the live image  to a disk (or flash memory)''' and configures the  system.
+
<br>
* For most distributions, the installation involves a  '''guided graphical environment''' help assist with the Linux installation process.
 
  
 
===Linux Installation Methods===
 
===Linux Installation Methods===
Line 69: Line 68:
 
'''Standalone Installation'''
 
'''Standalone Installation'''
  
* Linux is the <u>only</u> OS on the computer.   
+
: Linux is the <u>only</u> OS on the computer.   
* Any existing data on your hard disk will be '''erased'''.
+
: Any existing data on your hard disk will be '''erased'''.
  
  
Line 76: Line 75:
 
'''Dual-boot / Multi-boot Installation'''
 
'''Dual-boot / Multi-boot Installation'''
  
* A '''boot menu''' allows the user to select the desired OS.
+
: A '''boot menu''' allows the user to select the desired OS.<br><br>
* '''Advantages''' of Dual-Boot or Multi-Boot:<ol><li>This option provides a method to access your computer if one OS '''fails to boot-up'''.</li><li>'''Access the Windows partition''' if your Windows OS cannot boot-up.</li><li>This booting method is great for '''troubleshooting'''<br>(''for example:'' boot into Linux OS to eliminate a hardware issue).</li></ol>
+
: '''Advantages''' of Dual-Boot or Multi-Boot:<ol><li>This option provides a method to access your computer if one OS '''fails to boot-up'''.</li><li>'''Access the Windows partition''' if your Windows OS cannot boot-up.</li><li>This booting method is great for '''troubleshooting'''<br>(''for example:'' boot into Linux OS to eliminate a hardware issue).</li></ol>
* '''Installation Tips:'''<ol><li>It is recommended to '''back up important data''' before proceeding.</li><li>It is recommended to '''install the Linux OS <u>last</u>''', as other operating systems may not  offer a multi-boot option.</li></ol>
+
: '''Installation Tips:'''<ol><li>It is recommended to '''back up important data''' before proceeding.</li><li>It is recommended to '''install the Linux OS <u>last</u>''', as other operating systems may not  offer a multi-boot option.</li></ol>
  
  
Line 84: Line 83:
  
 
[[Image:vm-player-menu.png|thumb|right|250px|VMware Player launch menu for Ubuntu Linux OS<br>(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]
 
[[Image:vm-player-menu.png|thumb|right|250px|VMware Player launch menu for Ubuntu Linux OS<br>(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]
* Virtualization requires a compatible processor: not all processors  support that feature.
+
: ''Virtualization is the process of running a virtual instance of a computer system in a layer abstracted from the actual hardware.'' Reference: https://opensource.com/resources/virtualization
* Your BIOS should be set to '''<u>enable</u> Virtualization'''.
+
: The virtualized OS is installed and run in a window under another OS. Special software is used to manage the entire process, referred to as the '''hypervisor'''.<br><br>
* The virtualized OS is installed and run in a window under another OS.
+
: '''Advantages''' of Virtualization:<ol><li>You can run VM from an '''ISO image file''' or a '''VM file'''.</li><li>One or more virtual machines can be run at the <u>same</u> time.</li><li>The '''guest''' OS '''shares hardware''' with the '''host''' OS and possibly other virtualized systems.</li><li>The '''guest''' systems have '''network access''' through the host.</li></ol>
* The installation can usually be accomplished from an '''ISO image'''.
+
: '''Installation Tips:'''<ol><li>Virtualization requires a '''compatible processor''': not all processors support that feature.</li><li>Your '''BIOS''' should be set to '''<u>enable</u> Virtualization'''.</li><li>Popular VM software for '''Windows''', '''Apple''' and '''Linux''' OS include:<ul><li>VMware</li><li>Oracle Virtual Box</li></ul></li></ol>
* One or more virtual machines can be run at the same time.
 
* The guest OS '''shares hardware''' with the host OS and possibly other virtualized systems.
 
* Special software is used to manage the entire process, referred to as the '''hypervisor'''.
 
* The guest systems have network access through the host.
 
* The selection of virtualization software (which allows creation and running of virtual machines) depends mainly  on the host OS, although some are cross-platform. Other considerations as to virtualization software may be  features, support, price and/or personal preferences.
 
 
 
  
Popular VM software for Windows and MAC include:
 
*'''VMware'''
 
*'''Oracle Virtual Box'''
 
*'''KVM'''
 
*'''XEN'''
 
 
<br>
 
<br>
  
Line 105: Line 93:
  
 
[[Image:linux-distro-2.png|thumb|right|150px|Knoppix is a popular Live Linux CD Distribution.<br>(Image licensed under[https://creativecommons.org/licenses/by-sa/3.0/ cc])]]
 
[[Image:linux-distro-2.png|thumb|right|150px|Knoppix is a popular Live Linux CD Distribution.<br>(Image licensed under[https://creativecommons.org/licenses/by-sa/3.0/ cc])]]
''A live CD (also live DVD, live disc, or live operating system) is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading from a hard disk drive. A Live CD allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration. Live CDs can run on a computer without secondary storage, such as a hard disk drive, or with a corrupted hard disk drive or file system, allowing data recovery.<br><br>As CD and DVD drives have been steadily phased-out, live CDs have become less popular, being replaced by live USBs, which are equivalent systems written onto USB flash drives, which have the added benefit of having write-able storage. The functionality of a live CD is also available with a bootable live USB flash drive, or an external hard disk drive connected by USB.''
+
''A live CD (also live DVD, live disc, or live operating system) is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading from a hard disk drive. A Live CD allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration. ''
  
 
Reference: https://en.wikipedia.org/wiki/Live_CD
 
Reference: https://en.wikipedia.org/wiki/Live_CD
Line 124: Line 112:
 
# Click on the following link to download the lastest knoppix ISO:<br>[https://www.knopper.net/knoppix-mirrors/index-en.html https://www.knopper.net/knoppix-mirrors/index-en.html]<br><br>
 
# Click on the following link to download the lastest knoppix ISO:<br>[https://www.knopper.net/knoppix-mirrors/index-en.html https://www.knopper.net/knoppix-mirrors/index-en.html]<br><br>
 
# If you are burning to a CD, click on the following link for instructions:<br>[https://www.wikihow.com/Install-Knoppix-Linux Install Knoppix LInux]<br><br>'''NOTE:''' If you are burning to a USB, click on the following link for instructions:<br>[https://itstillworks.com/boot-knoppix-usb-6904288.html How to Boot Knoppix from USB] -->
 
# If you are burning to a CD, click on the following link for instructions:<br>[https://www.wikihow.com/Install-Knoppix-Linux Install Knoppix LInux]<br><br>'''NOTE:''' If you are burning to a USB, click on the following link for instructions:<br>[https://itstillworks.com/boot-knoppix-usb-6904288.html How to Boot Knoppix from USB] -->
 +
<br><br>
  
 
=INVESTIGATION 1: BOOTING KNOPPIX (LIVE LINUX) VIA VIRTUALBOX=
 
=INVESTIGATION 1: BOOTING KNOPPIX (LIVE LINUX) VIA VIRTUALBOX=
  
<br>
+
<span style="color:red;">'''ATTENTION''': Depending on your ULI101 instructor, you may be required to complete this tutorial for '''marks''' in the course.<br>Please refer to your instructor's course notes or lectures to refer to evaluation for this course.<br><br>This is an OPTIONAL assignment, but is worth a '''bonus mark''' of 1% if successfully completed by the student.<br><br>The due date for successfully completing this tutorial (i.e. '''tutorial 7''') is by '''Friday by midnight''' next week (i.e. '''Week 12''').<br>If your instructor has NOT assigned marks for completing this tutorial, you can perform it for practice.</span><br><br>
In this section, you will first ''download'' and ''install'' the '''VirtualBox''' VM application on your home computer,<br>then you will then ''download'' and unzip the '''Knoppix Live Distribution VM''' file to your computer.  
+
 
 +
In this investigation, you will first ''download'' and ''install'' the '''VirtualBox''' VM application on your home computer,<br>then you will then ''download'' and unzip the '''Knoppix Live Distribution VM''' file to your computer.  
  
  
Line 151: Line 141:
 
-->
 
-->
  
# '''Click''' the following link to access the '''Oracle Virtualbox''' application download website:<br>https://www.virtualbox.org/wiki/Downloads https://www.virtualbox.org/wiki/Downloads]<br><br>
+
# '''Click''' the following link to access the '''Oracle Virtualbox''' application download website:<br>[https://www.virtualbox.org/wiki/Downloads https://www.virtualbox.org/wiki/Downloads]<br><br>
 
# In this website, '''click''' the link corresponding to your '''computer's operating system'''<br>to download to your computer.<br><br>
 
# In this website, '''click''' the link corresponding to your '''computer's operating system'''<br>to download to your computer.<br><br>
 
# '''Install''' the downloaded '''Virtualbox''' VM application on your computer.<br><br>'''NOTE:''' You may be required to allow '''authorization''' to run this program, select to install devices (if prompted) and to '''restart''' your computer after installation.<br><br>  
 
# '''Install''' the downloaded '''Virtualbox''' VM application on your computer.<br><br>'''NOTE:''' You may be required to allow '''authorization''' to run this program, select to install devices (if prompted) and to '''restart''' your computer after installation.<br><br>  
Line 162: Line 152:
 
# '''Click''' the '''Knoppix Start button''' (refer to <u>left</u> icon in diagram on right). In the '''Knoppix menu''', select '''System Tools'''<br><br>[[Image:xterm.png|thumb|right|280px|The '''Konsole''' application will display the Bash shell to issue Linux commands.]]
 
# '''Click''' the '''Knoppix Start button''' (refer to <u>left</u> icon in diagram on right). In the '''Knoppix menu''', select '''System Tools'''<br><br>[[Image:xterm.png|thumb|right|280px|The '''Konsole''' application will display the Bash shell to issue Linux commands.]]
 
# In the system tools menu, and select '''Konsole''' to launch a terminal application.<br><br>'''FYI:''' To '''increase''' font size, press '''ctrl+''' to '''reduce''' font size, press '''ctrl-'''.<br>You can drag the Konsole terminal window from the bottom-right corner<br>to increase the window size.<br><br>
 
# In the system tools menu, and select '''Konsole''' to launch a terminal application.<br><br>'''FYI:''' To '''increase''' font size, press '''ctrl+''' to '''reduce''' font size, press '''ctrl-'''.<br>You can drag the Konsole terminal window from the bottom-right corner<br>to increase the window size.<br><br>
# In the bash shell, issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">whoami</span><br><br>What is the name of your generic Knoppix Linux Live account?<br>On your Knoppix live OS, there is a '''generic''' user called "'''knoppix'''" that can<br>be accessed <u>without</u> a password. This account has its own home directory.<br><br>Let's test this out by using the ssh command to connect to your Matrix account.<br>Your Knoppix virtual machine uses your host computer's operating system which<br>is already connected to '''Seneca's Global Portal'''.<br><br>
+
# In the bash shell, issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">whoami</span><br><br>What is the name of your generic Knoppix Linux Live account?<br>On your Knoppix live OS, there is a '''generic''' user called "'''knoppix'''" that can<br>be accessed <u>without</u> a password. This account has its own home directory.<br><br>Let's test this out by using the ssh command to connect to your Matrix account.<br>Your Knoppix virtual machine uses your host computer's operating system which<br>is already connected to '''Seneca's GlobalProtect VPN'''.<br><br>
<!-- # Issue the following Linux command to '''download''' a Bash Shell script to connect<br>to the '''Seneca Global Portal''':<br><span style="color:blue;font-weight:bold;font-family:courier;">wget itas.senecacollege.ca/~mark.fernandes/vpn</span><br><br>
+
<!-- # Issue the following Linux command to '''download''' a Bash Shell script to connect<br>to the '''Seneca GlobalProtect VPN''':<br><span style="color:blue;font-weight:bold;font-family:courier;">wget itas.senecacollege.ca/~mark.fernandes/vpn</span><br><br>
 
# Issue the following Linux command to add execute permissions to be able to run this script:<br><span style="color:blue;font-weight:bold;font-family:courier;">chmod +x vpn</span><br><br>
 
# Issue the following Linux command to add execute permissions to be able to run this script:<br><span style="color:blue;font-weight:bold;font-family:courier;">chmod +x vpn</span><br><br>
 
# Issue the following Linux command to the '''/usr/bin''' directory so this script works like a command:<br><span style="color:blue;font-weight:bold;font-family:courier;">sudo mv vpn /usr/bin</span><br><br>
 
# Issue the following Linux command to the '''/usr/bin''' directory so this script works like a command:<br><span style="color:blue;font-weight:bold;font-family:courier;">sudo mv vpn /usr/bin</span><br><br>
# Issue the following shell script to connect to the Seneca Global Portal: <span style="color:blue;font-weight:bold;font-family:courier;">vpn -c</span><br><br>You should be connected to the Seneca Global Portal. <br>Let's test this out by using the ssh command to connect to your Matrix account.<br><br>
+
# Issue the following shell script to connect to the Seneca GlobalProtect VPN: <span style="color:blue;font-weight:bold;font-family:courier;">vpn -c</span><br><br>You should be connected to the Seneca GlobalProtect VPN. <br>Let's test this out by using the ssh command to connect to your Matrix account.<br><br>
 
# We need the '''vpn -c''' command to <u>keep</u> running in this terminal; therefore, '''open <u>another</u> Konsole terminal'''.<br><br>
 
# We need the '''vpn -c''' command to <u>keep</u> running in this terminal; therefore, '''open <u>another</u> Konsole terminal'''.<br><br>
 
# In that '''<u>new</u>''' terminal, issue the following Linux command to connect to your Matrix account:<br><span style="color:blue;font-weight:bold;font-family:courier;">ssh yourSenecaId@matrix.senecacollege.ca</span><br><br>
 
# In that '''<u>new</u>''' terminal, issue the following Linux command to connect to your Matrix account:<br><span style="color:blue;font-weight:bold;font-family:courier;">ssh yourSenecaId@matrix.senecacollege.ca</span><br><br>
Line 179: Line 169:
 
# '''Save''' editing changes and '''exit''' the text editor.<br><br>
 
# '''Save''' editing changes and '''exit''' the text editor.<br><br>
 
# Confirm that you created this file and confirm that the contents of this file are correct.<br><br>Let's run a <b>shell script</b> to check that you created the '''myvm.txt''' file (with correct file contents) in your home directory.<br><br>
 
# Confirm that you created this file and confirm that the contents of this file are correct.<br><br>Let's run a <b>shell script</b> to check that you created the '''myvm.txt''' file (with correct file contents) in your home directory.<br><br>
#Enter the following command: <span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul/scripts/week7-check-1</span><br><br>
+
#Enter the following command: <span style="color:blue;font-weight:bold;font-family:courier;">~uli101/week7-check-1</span><br><br>
 
# If you encounter errors, make corrections and then re-run the checking script until you receive<br>a congratulations message, and proceed to the next step.<br><br>
 
# If you encounter errors, make corrections and then re-run the checking script until you receive<br>a congratulations message, and proceed to the next step.<br><br>
 
# Issue the following Linux command to '''terminate''' your Matrix session: <span style="color:blue;font-weight:bold;font-family:courier;">exit</span><br><br>
 
# Issue the following Linux command to '''terminate''' your Matrix session: <span style="color:blue;font-weight:bold;font-family:courier;">exit</span><br><br>

Revision as of 11:34, 27 May 2021

INSTALLING LINUX / LIVE LINUX / VIRTUALIZATION


Main Objectives of this Practice Tutorial

  • Download and install the VirtualBox VM software application
  • Download and run the Knoppix Live VirtualBox file in a virtual machine
  • Open a terminal and connect to your Matrix account via the ssh utility
  • Run several open-source applications in your graphical Knoppix Linux environment
  • Understand the limitation of running Knoppix Live as opposed to a persistent Knoppix installation


Tutorial Reference Material

Course Notes
Concepts
YouTube Videos
Course Notes: Installing Linux Knoppix Resources Instructional Videos:

KEY CONCEPTS

Installing Linux

Having a Linux system on your home computer provides access to a large selection of open source software.

Installing your own version of Linux on your notebook or desktop computer also can make it easier to practice working
in the Linux environment and learn how to perform routine Linux OS administration tasks.


Listing of Common Linux Distributions.
(Image licensed under cc)

A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that is based upon the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems...

Reference: https://en.wikipedia.org/wiki/Linux_distribution


Steps in the Linux Installation Process:

  • Select a Linux Distribution to download (ISO image file or VM file).
  • Create VM and install Linux Distribution or run VM file.


Linux Installation Methods

Linux is the only OS on the computer
(Image licensed under cc)

Standalone Installation

Linux is the only OS on the computer.
Any existing data on your hard disk will be erased.


The grub boot menu to select different operating systems upon computer startup.
(Image licensed under cc)

Dual-boot / Multi-boot Installation

A boot menu allows the user to select the desired OS.

Advantages of Dual-Boot or Multi-Boot:
  1. This option provides a method to access your computer if one OS fails to boot-up.
  2. Access the Windows partition if your Windows OS cannot boot-up.
  3. This booting method is great for troubleshooting
    (for example: boot into Linux OS to eliminate a hardware issue).
Installation Tips:
  1. It is recommended to back up important data before proceeding.
  2. It is recommended to install the Linux OS last, as other operating systems may not offer a multi-boot option.


Virtual Machine Installation

VMware Player launch menu for Ubuntu Linux OS
(Image licensed under cc)
Virtualization is the process of running a virtual instance of a computer system in a layer abstracted from the actual hardware. Reference: https://opensource.com/resources/virtualization
The virtualized OS is installed and run in a window under another OS. Special software is used to manage the entire process, referred to as the hypervisor.

Advantages of Virtualization:
  1. You can run VM from an ISO image file or a VM file.
  2. One or more virtual machines can be run at the same time.
  3. The guest OS shares hardware with the host OS and possibly other virtualized systems.
  4. The guest systems have network access through the host.
Installation Tips:
  1. Virtualization requires a compatible processor: not all processors support that feature.
  2. Your BIOS should be set to enable Virtualization.
  3. Popular VM software for Windows, Apple and Linux OS include:
    • VMware
    • Oracle Virtual Box


Live Linux CD

Knoppix is a popular Live Linux CD Distribution.
(Image licensed undercc)

A live CD (also live DVD, live disc, or live operating system) is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading from a hard disk drive. A Live CD allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration.

Reference: https://en.wikipedia.org/wiki/Live_CD


The Knoppix Live CD is available to run on workstations at Seneca College via AppsAnywhere
or you can download and run it on your home computer as a Virtual Machine
(requires VirtualBox VM software installed on your computer).



INVESTIGATION 1: BOOTING KNOPPIX (LIVE LINUX) VIA VIRTUALBOX

ATTENTION: Depending on your ULI101 instructor, you may be required to complete this tutorial for marks in the course.
Please refer to your instructor's course notes or lectures to refer to evaluation for this course.

This is an OPTIONAL assignment, but is worth a bonus mark of 1% if successfully completed by the student.

The due date for successfully completing this tutorial (i.e. tutorial 7) is by Friday by midnight next week (i.e. Week 12).
If your instructor has NOT assigned marks for completing this tutorial, you can perform it for practice.


In this investigation, you will first download and install the VirtualBox VM application on your home computer,
then you will then download and unzip the Knoppix Live Distribution VM file to your computer.


You will then launch the VirtualBox application by double-clicking the downloaded VirtualBox VM.
Once you launch the Knoppix Linux distribution, you will learn in INVESTIGATION 2 to perform
a few basic operations in the Knoppix Linux graphical Linux environment.


Perform the Following Steps:

Download page for VirtualBox VM application.


ATTENTION: If you receive an error message indicating that your computer is NOT
set to handle virtualization, you need to enable virtualization in your notebook’s BIOS.


  1. Click the following link to access the Oracle Virtualbox application download website:
    https://www.virtualbox.org/wiki/Downloads

  2. In this website, click the link corresponding to your computer's operating system
    to download to your computer.

  3. Install the downloaded Virtualbox VM application on your computer.

    NOTE: You may be required to allow authorization to run this program, select to install devices (if prompted) and to restart your computer after installation.

  4. Click the following link to download the zipped (compressed) Knoppix Live Distribution
    file to your computer: Knoppix Virtualbox VM

    NOTE: This file is approximately 5GB in size and might take a while to download.

  5. Open a File Manager application and navigate to directory that the Knoppix.zip file
    was downloaded (eg. Downloads).

    Knoppix VM file contained in the zipped file. Double-click Knoppix.vbox file to launch the Knoppix Live Linux Distribution.
  6. Unzip the downloaded zip file (In MS Windows: Right click and Select "Extract All" )

    NOTE: The contents of this zipped file should appear in another file manager window.

  7. Navigate to the folder containing the extracted zipped files and double-click the file called Knoppix.vbox to launch the Knoppix VM.

    NOTE: By double-clicking on this file (even if the VirtualBox application is not running)
    it will launch the VirtualBox application and start the Knoppix virtual machine.

    If you have difficulty running Knoppix on your home machine/laptop you may ask your
    Learning Centre ULG leaders for additional help in troubleshooting why Knoppix
    is not working on your home machine/laptop.

    Knoppix Start button (icon on the left).
    The Knoppix Linux desktop environment has a similar look as the MS Windows desktop environment. (Image licensed undercc)
  8. If prompted, click Scale to proceed.

  9. Allow time for the Knoppix Linux distribution to start. This is a graphical Linux distribution which will start-up in a desktop environment.

    NOTE: You are NOT prompted for a username and password because this is a Linux Live distribution and you have been assigned a generic account.

  10. Click the Knoppix Start button (refer to left icon in diagram on right). In the Knoppix menu, select System Tools

    The Konsole application will display the Bash shell to issue Linux commands.
  11. In the system tools menu, and select Konsole to launch a terminal application.

    FYI: To increase font size, press ctrl+ to reduce font size, press ctrl-.
    You can drag the Konsole terminal window from the bottom-right corner
    to increase the window size.

  12. In the bash shell, issue the following Linux command: whoami

    What is the name of your generic Knoppix Linux Live account?
    On your Knoppix live OS, there is a generic user called "knoppix" that can
    be accessed without a password. This account has its own home directory.

    Let's test this out by using the ssh command to connect to your Matrix account.
    Your Knoppix virtual machine uses your host computer's operating system which
    is already connected to Seneca's GlobalProtect VPN.

  13. Issue the following Linux command to connect to your Matrix account:
    ssh yourSenecaId@matrix.senecacollege.ca

  14. Enter yes to share your public key.

  15. When prompted, enter your password (remember that password does not "echo-back").

    Were you able to connect to your Matrix account?

  16. Confirm that you are in your home directory on your Matrix account.

  17. Use a text editor (nano or vi) to create a file in your current directory called myvm.txt
    and enter the following text displayed below:

    This is line 1
    This is line 2
    This is line 3


  18. Save editing changes and exit the text editor.

  19. Confirm that you created this file and confirm that the contents of this file are correct.

    Let's run a shell script to check that you created the myvm.txt file (with correct file contents) in your home directory.

  20. Enter the following command: ~uli101/week7-check-1

  21. If you encounter errors, make corrections and then re-run the checking script until you receive
    a congratulations message, and proceed to the next step.

  22. Issue the following Linux command to terminate your Matrix session: exit

  23. Remain in the Konsole terminal window when performing INVESTIGATION 2.

In the next investigation, you will learn to work in a graphical Linux environment.
You will also run several open-source application within the Knoppix graphical environment.



INVESTIGATION 2: USING THE GRAPHICAL KNOPPIX VM

Let's learn to run open-source applications on your graphical Knoppix Linux Live distribution.
But first, let's download and run a shell script that will display dialog boxes in your graphical Knoppix VM.


Perform the Following Steps:

  1. Make certain that you are running your Knoppix Linux Live virtual Machine
    (refer to step #7 in INVESTIGATION 1 )

    Although you will be learning to create and run shell scripts (near the end of this course)
    in your Matrix server , those scripts will only run in a command-line environment.

    Since you are running a graphical Knoppix Linux distribution on your computer,
    you can run scripts graphically (including the use of dialog boxes for input, output, etc.).

    Graphical input dialog box.
  2. Make certain that you are in a Konsole terminal window
    (but NOT connected to your Matrix account).

  3. Issue the following command to download a shell script called week7-demo-1 from the Internet:
    wget https://matrix.senecacollege.ca/~murray.saul/week7-demo-1

  4. Issue the ls command to confirm that the file called week7-demo-1
    has been downloaded to your current directory.

  5. Issue the following to run this shell script:
    bash week7-demo-1

  6. In the dialog box, click to select the /home/knoppix directory and click OK.

    What did you notice?

  7. Issue the following Linux command: ls -l week7-demo-1

    Notice there are NO execute permissions for this shell script file.
    That is why we have to issue the bash command followed by
    the shell script file pathname (as an argument) to run the shell script.

    Let's add execute permissions so we can run this command by name
    (i.e. without using the bash command).

    Graphical output dialog box.
  8. Issue the following command to add execute permissions for everyone
    for the week7-demo-1 file: chmod +x week7-demo-1

    FYI: This method is a quick method of adding execute permissions for
    the owner, same group members and others.

  9. Issue the ls -l command for this file to confirm execution permissions were properly added.

  10. Issue the following: ./week7-demo-1

    Did the shell script run?

    NOTE: The shell script uses the zenity command to create dialog boxes. Although you may need to install this application in other Linux distributions, it is automatically included with the Knoppix distribution. We don't learn about the zenity command in this course, but here is a link to some simple examples using this command in case you are interested: How to Use Zenity

    REMEMBER: You CANNOT run this graphical shell script on your Matrix server,
    since Matrix is only a COMMAND-LINE environment and NOT a graphical environment.

  11. Issue the Linux command: exit to close the Konsole terminal window.

    Knoppix WIKI in the Firefox
    web-browser.
    The LibreOffice word processor.
  12. Use the Knoppix start menu and search the Internet submenu to launch the firefox web-browser.

  13. In the web-browser, go to the Google website and perform a Net-search on the Knoppix wiki.

  14. When finished browsing the Knoppix WIKI, close the Firefox web-browser.

  15. Use the Knoppix start menu to select Office and then select LibreOffice - Writer
    to launch a word processing application.

    NOTE: Libre office is a free open-source suite of productivity tools for
    creating documents, spreadsheets and slide presentations.

  16. Create a new document, type in a paragraph and then save changes to the file mydoc to your home directory,
    and exit the Libreoffice word processing document.

    Shutdown menu for Knoppix to terminal graphical Linux session.
  17. Use the Knoppix start menu to select logout, then select shutdown to terminate your Knoppix Linux Live session.

  18. Press ENTER when it indicates to Remove your CD.

    NOTE: Although you are NOT using a physical CD, this step is required to shut-down
    your Knoppix session and close your VirtualBox application.

    Graphical file manager for Knoppix.
  19. Launch a new Knoppix Linux Live session (INVESTIGATION 1, step #7).

  20. Use the Knoppix start menu to launch a graphical file manager
    (Hint: Accessories -> Files).

  21. In the file manager, search for your word processing document file and your downloaded shell script that were contained on your home directory.

    Does your word processing document or your downloaded shell script exist?
    If not, why?

    The Frozen-Bubble arcade game.
  22. Open the Knoppix start menu, select games and try running a few games
    (a few recommendations are: Frozen Bubble, Extreme Tux Racer and Open Arena).

    Now that you have had an opportunity to use your Knoppix Linux Live distribution,
    let's shutdown the VM and move onto the practice questions at the bottom of this tutorial.

  23. Open the Knoppix start menu and select logout and shutdown to end your Knoppix Live session.

LINUX PRACTICE QUESTIONS

The purpose of this section is to obtain extra practice to help with quizzes, your midterm, and your final exam.

Here is a link to the MS Word Document of ALL of the questions displayed below but with extra room to answer on the document to simulate a quiz:

https://ict.senecacollege.ca/~murray.saul/uli101/uli101_week7_practice.docx

Your instructor may take-up these questions during class. It is up to the student to attend classes in order to obtain the answers to the following questions. Your instructor will NOT provide these answers in any other form (eg. e-mail, etc).


Review Questions:

  1. Define the term Linux Distribution.
  2. List and explain two advantages of installing a Linux distribution on your home computer or laptop.
  3. List and explain two things to consider prior to installing a Linux distribution on your home computer.
  4. Explain why installing Multi-boot for Linux is useful for computer troubleshooting.
  5. Define the term Virtualization.
  6. List the steps to start the Knoppix Linux distribution from your home computer.
  7. List 4 applications that are contained in the Knoppix Linux Live distribution.
  8. Explain the difference between a Live Linux distribution and an installed Linux distribution.