Changes

Jump to: navigation, search

Tutorial 1: Using Your Matrix Server Account

344 bytes added, 20:33, 4 September 2023
no edit summary
{{Admon/caution|DO NOT USE THIS VERSION OF THE LAB. This page will no longer be updated.|'''New version here:''' https://seneca-ictoer.github.io/ULI101/A-Tutorials/tutorial1<br />'''Andrew's students please go here:''' http://wiki.littlesvr.ca/wiki/OPS145_Lab_1}}
=USING YOUR MATRIX SERVER ACCOUNT=
===Main Objectives of this Practice Tutorial===
* Learn how to access your '''Matrix''' server account (from home and/or from Seneca computer lab).
* Learn several ways to '''exit''' your Matrix Linux Account session.
|- valign="top" style="padding-left:15px;"
|colspan="2" |'''Slides:'''<ul><li>Week 1 Lecture 1 Notes:<br> [https://githubwiki.comcdot.senecacollege.ca/ULI101uli101/slides/raw/main/ULI101-1.1.pdf PDF] | [https://githubwiki.cdot.comsenecacollege.ca/ULI101uli101/slides/raw/main/ULI101-1.1.pptx PPTX]</li><li>Week 1 Lecture 2 Notes:<br> [https://githubwiki.cdot.comsenecacollege.ca/ULI101uli101/slides/raw/main/ULI101-1.2.pdf PDF] | [https://githubwiki.cdot.comsenecacollege.ca/ULI101uli101/slides/raw/main/ULI101-1.2.pptx PPTX] <br></li></ul>'''Tutorials:'''<ul><li>[https://wiki.cdot.senecacollege.ca/wiki/Tutorial_1:_Using_Your_Matrix_Server_Account#INVESTIGATION_1:_ACCESSING_YOUR_MATRIX_LINUX_ACCOUNT HOWTO: Access Your Matrix Account]</li></ul>'''Windows SSH client Software:'''<ul><li>[http://www.sfsu.edu/ftp/win/ssh/SSHSecureShellClient-3.2.9.exe SSH/SFTP]</li><li>[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty]</li><li>[https://www.bitvise.com/ssh-client-download Bitvise SSH Client]</li><li>[https://mobaxterm.mobatek.net/download-home-edition.html MovaXterm]</li></ul>
| style="padding-left:15px;" |'''Matrix Account Access:'''
===Connecting to Your Matrix Account===
[[Image:cls-shell.png|thumb|right|100px|Connect to Matrix via'''ssh''' command]]There are two basic methods to connecting to your Matrix account. '''Method 1: Run ssh Command from command prompt:'''
[[Image:cls-shell.png|thumb|right|100px|Connect After connecting to Matrix viathe '''Seneca Student VPN'''ssh, you can open a ''' command]]:terminal''' in '''Windows 10 (or above)''', '''Mac''' or '''Method 1: Run ssh Command from command prompt:Linux'''computer and issue the following command:: <span style="color:blue;font-weight:bold;">ssh senecauserid@matrix.senecacollege.ca</span>
:After connecting to the '''Seneca Student VPN''', you can open a '''command terminal'''<br>in your '''Newer Windows 10''', '''Mac''' or '''Linux''' computer and issue the following command:<br><br><span style="color:blue;font-weight:bold;">ssh senecauserid@matrix.senecacollege.ca</span><br><br>
[[Image:ssh-main-window.png|thumb|right|100px|Connect to Matrix via '''graphical''' SSH Program ]]
:'''Method 2: Run graphical ssh program via MyApps in Seneca computer lab:''' :If you are in a Seneca computer lab, you can use MyApps to run a '''graphical SSH application''' for your Windows machine. One advantage of using this method is that you are already at Seneca and are NOT required to connect to the student VPN.<br><br> 
'''NOTE:''' You instructor may show you how to run a graphic Linux VM in order to connect to your Matrix account (if interested, refer to the optional tutorial at the end of this semester).
<br><br><br>
=INVESTIGATION 1: ACCESSING YOUR MATRIX LINUX ACCOUNT=
 <span style="color:red;">'''{{Admon/important|ATTENTION''': This online weekly tutorial will be required to must be completed by '''Friday at 11:59pm in week Week 2 by midnight''' to obtain a grade of '''2%''' towards this course</span><br><br>.|It is essential that you complete these Weekly Tutorials fully and on time. These are your major learning tool in the course. There are no late marks.}}
In this section, you will learn how to access your Matrix Linux account by two different methods:
:* From your '''home computer''' <br>
:* From a '''workstation in a Seneca College''' lab via '''MyApps'''
 
===METHOD 1: CONNECTING TO YOUR MATRIX ACCOUNT FROM YOUR HOME COMPUTER===
<table style="margin-left:50px;">
<tr valign="top" style="text-align:center;">
<th>'''Newer Version of Windows 10(or above):'''</th> <th>'''MacOSXmacOS:''' </th>
<th>'''Linux:''' </th>
</tr>
# It is recommended to repeat these steps with connecting to your Matrix account from a Seneca lab workstation until you become comfortable with the process.<br><br>
In the next investigation, you will learn how to issue Linux commands from the command prompt (referred to as the "shell"), learn how to get help with Linux commands, use command-line editing short cut keys, and run a program to confirm that you connected to your Matrix account in order to get marks for this online tutorial.<br><br>
=INVESTIGATION 2: USING THE LINUX SHELL =
# Issue the following Linux command to confirm your current location: <span style="font-family:courier;color:blue;font-weight:bold">pwd</span>
#* '''Question:''' What do you notice?
#* '''Question:''' What makes this command with that argument useful if you are current currently located in your home directory?
# Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">clear</span>
#* '''Question:''' What do you notice? Why is this command helpful?
==Getting Help with Linux Commands==
With the Linux OS containing over '''2500''' commands and utilities, it is good 's important for a Linux user or <br>users and Linux system administrator administrators (sysadmin) to learn about how to use commands “on-the-fly”.<br><br> The '''man''' command can provide utility is an interactive collection of manual pages that provides information on how to use a given command<br>(i.e. '''command usage''', '''acceptable command arguments''', '''command options''', '''examples''').<br><br> # Issue For an example, issue the following commandfor the manual page about the manual utility: <span style="font-family:courier;color:blue;font-weight:bold">man man</span><br><br>#* You may notice that the online manual categories commands into sections or '''numbered volumes'''.<br><br># Type Press the '''SPACE''' key to move to the next screen.<br><br>#* '''Question:''' How many '''volume numbers''' are contained in the man pages (like '''executable commands''',<br>'''games''', or '''system administrator commands''')?<br><br>'''TIP:''' # You can use the following '''short-cut shortcut keys''' within the man command to <br>help navigate throughout this utility to get help with the ls command (refer to table below):<br><br>#::<table cellpadding="3"><tr><th style="border-bottom: 1px solid black;">Keyboard Shortcut</th><th style="border-bottom: 1px solid black;">Purpose</th></tr><tr><td>'''ENTER'''</td><td>Move down one line</td></tr><tr><td>'''SPACEBAR'''</td><td>Move one screen down</td></tr><tr><td>'''&lt;ctrl&gt;&lt;b&gt;'''</td><td>Move one screen up</td></tr><tr><td>'''/pattern/'''</td><td>Search for Pattern</td></tr><tr><td>'''q'''</td><td>quit man utility</td></tr></table><br># If you are connected to Matrix through a terminal application, you can also use your mouse's scroll wheel.# Press the letter <span style="font-family:courier;color:blue;font-weight:bold">q</span> key to exit the man command.<br><br># Issue Use the following Linux command ''man'' utility to get help with the ''ls '' command: <span style="font-family:courier;color:blue;font-weight:bold">man ls</span><br><br># Navigate through the man utility for the '''ls''' Linux command manual page and note write down the '''option letters''' that correspond to the following descriptions:<br><ul><li>#*"'''use a long listing format'''"</li><li>#*"'''do not ignore entries starting with .'''" (i.e. hidden files)</li><li>#*"'''sort by file size'''"</li><li>#*"'''append indicator (one of */=>&|) to entries'''" (i.e. type of file)</li></ul><br># Exit the man utility for the ''ls'' command.<br><br># Issue the '''ls''' command for using <u>each</u> of those option letters you noted in '''step 5''' to see how this the command differs for 's output changes with each option.<br><br>#* '''NOTE:''' The '''man''' utility can be used with the '''-k''' option to help list Linux commands that match a text pattern<br>that is contained within the help screen for a Linux command.<br><br># '''Pipeline commands''' can be used to filter-out unnecessary output. In the next command that you will be issuing,<br>the output from the '''man -k''' command, is sent into the '''grep''' command to ''filter'' (i.e. ''trap'') only output that matches the pattern "8"<br>(The number "8" refers to the category of type of command - in this case, administration commands).<br><br>We will learn more about pipeline commands later in this course.<br><br># Issue the following Linux pipeline command: <span style="font-family:courier;color:blue;font-weight:bold">man -k user | grep 8</span><br><br>#* '''Question:''' How does this ''pipeline command'' make it easier to obtain information regarding man command?<br><br># If you wish to change your passwordon typical Linux systems, you can change it by issuing the command: <span style="font-family:courier;color:blue;font-weight:bold">passwd</span>{{Admon/caution|Do NOT run the <code>passwd<br/code>command on Matrix!|Unique to this college, your Linux password is changed automatically when you change your ''myseneca'' password.}}#* '''Question:''' What option for the ''passwd '' command can be used to change user info (such as name)?<br>#* '''Hint:''' use the '''man''' command for '''passwd'''.<br><br>'''NOTE:''' Do '''NOT''' run the ''passwd'' command. Unique for this college, your Matrix password<br>is changed automatically when you change your '''myseneca''' password.<br><br><br># Press the letter <span style="font-family:courier;color:blue;font-weight:bold">q</span> key to exit the man command.<br><br> You will now learn how to perform '''command line editing'''<br>to correct syntax errors while typing Linux commands PRIOR to pressing the ENTER key.
==Command Line Editing==
'''Running a Shell Script to Check Student Online Tutorial Participation'''
<table align="right"><tr valign="top"><td>[[Image:script-check-1.png|thumb|right|250px|If all all check pass, then user performed can proceed.]]</td><td>[[Image:script-check-2.png|thumb|right|450px|If there is a warning, then feedback is provided to user to correct and re-run checking script.]]</td></table>
Professors will require students successfully perform these online tutorials for marks (within a deadline). <br>In order to confirm that you successfully performed a tutorial, you will be required to run a program<br>(or in later tutorials, several programs) to prove that you successfully completed tasks in a tutorial and get marks. These programs (known as Shell Scripts) will check your work and offer feedback if you made mistakes, so you can make corrections.<br>Making corrections (i.e. troubleshooting) and re-running these checking programs until you are successful will help students<br>gain "hands-on" experience as well as "trouble-shooting experience.
These programs (known as Shell Scripts) will check your work and offer feedback if you made mistakes, so you can make corrections. Making corrections (i.e. troubleshooting) and re-running these checking programs until you are successful will help students gain "hands-on" experience as well as "trouble-shooting experience.
<table align="right"><tr valign="top"><td>[[Image:script-check-1.png|thumb|right|250px|If all all check pass, then user performed can proceed.]]</td><td>[[Image:script-check-2.png|thumb|right|450px|If there is a warning, then feedback is provided to user to correct and re-run checking script.]]</td></table>
If you have correctly completed the required tasks, the user can proceed. If the checking shell script detects an '''error''', then it will provide feedback to allow the student to fix that problem so they can re-run the checking shell scripts until they have successfully completed a task.
 
'''Perform the Following Steps:'''
# Make certain that your current directory is '''your home directory'''<br>By by entering the following Linux command:<br>#* <span style="color:blue;font-weight:bold;font-family:courier;">cd</span><br><br>#Issue the following command to run a checking script :<br>#* <span style="font-family:courier;color:blue;font-weight:bold">~uli101/week1-check</span><br><br>#* '''Note:''' The beginning character "'''~'''" is called '''tilde'''. You get this character by pressing '''SHIFT''' + '''`'''<br>(which is the key to the left of the number 1 on your keyboard). <br><br># Your screen should clear and indicate that you have proved that you have successfully logged in.<br><br># An email will be sent to your Seneca email as '''confirmation''' in case your ULI101 professor is assigning marks to these tutorials.<br><br>#* Keep those confirmation email messages for the duration of this semester as proof that you have completed those checking scripts in case there is a discrepancy in tutorial grades.<br><br> 
<!--
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 a Word Document document of ALL of the questions displayed below but with extra room to answer on the document tosimulate a quiz:
: https://githubwiki.com/ULI101/labscdot.senecacollege.ca/rawuli101/mainfiles/uli101_week1_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:'''

Navigation menu