Open main menu

CDOT Wiki β

Changes

Tutorial 1: Using Your Matrix Server Account

892 bytes added, 19: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=
<br>===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. :* Understand the '''Linux command structure''' and how to get '''help''' with Linux command usage. :* Become efficient with '''Linux command line editing''' by using '''short-cut keys'''. :* Issue a '''checking program''' (i.e. ''Shell Script'') to '''confirm''' that you accessed your Matrix account. :* Perform '''LINUX PRACTICE QUESTIONS''' for additional practice<br><br>.
===Tutorial Reference Material===
|- valign="top" style="padding-left:15px;"
|colspan="2" |'''Slides:'''<ul><li>Week 1 Lecture 1 Notes:<br> [[Mediahttps://wiki.cdot.senecacollege.ca/uli101/slides/ULI101-Week11.1.pdf | PDF]] | [https://matrixwiki.cdot.senecacollege.ca/~chris.johnsonuli101/ULI101slides/ULI101-Week11.1.pptx PPTX]</li><li>Week 1 Lecture 2 Notes:<br> [[Mediahttps://wiki.cdot.senecacollege.ca/uli101/slides/ULI101-Week11.2.pdf | PDF]] | [https://matrixwiki.cdot.senecacollege.ca/~jason.carmanuli101/slides/ULI101-Week11.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><li>[http://czegel.com/seneca/uli101/lectures/Lecture1.html Les Czegel's Week 1 Notes (HTML)]</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:'''
= KEY CONCEPTS=
===Purpose of Having a Your Student Account on Matrix Linux Server Account===
While attending Seneca College, you will be using many different computer systems.
|-
| style="padding-left:0px;width:10%" |'''mylearn.senecacollege.ca'''
| style="padding-left:15px;width:65%" |Learning Content Management System (''Link to Resources'' / ''Student Grades'' / ''Online Quizzes'')
 
|-
| style="padding-left:0px;width:10%" |'''ict.senecacollege.ca'''
| style="padding-left:15px;width:65%" |Online access to slides, documents via webpage links
|-
| style="padding-left:0px;width:10%" |'''wiki.cdot.senecacollege.ca'''
| style="padding-left:15px;width:65%" |''Student Lecture Notes'' / ''Tutorials'' (weekly, review) / ''Practice Questions'' / ''Additional Learning Resources''
|-
| style="padding-left:0px;width:10%" |'''<span style="color:blue;">matrix.senecacollege.ca</span>'''
| style="padding-left:15px;width:65%" |Matrix is our Linux Account server environment used for "''hands-on Practicepractice''". Each ULI101 student has an account on this server.
|}
[[Image:cli-prompt.png|thumb|right|120px|A '''shell''' is an interface / interpreter to allow a user to communicate with the Linux computer system. ]]
Although you need to study concepts throughout this course (slides, etc.), you will also need to get '''hands-on practice running Linux commands as well as performing and submitting online tutorials'''.
[[Image:cli-prompt.png|thumb|right|120px|A '''shell''' is an interface / interpreter to allow a user to communicate with the Linux computer system. ]]Although you need to study concepts throughout this course (slides, etc.), you will also need to get '''hands-on practice running Linux commands as well as performing and submitting online tutorials'''.<br>This requires that you '''connect to a Linux server''' (Matrix) and become comfortable with '''issuing Linux commands'''.
In Unix/Linux, a '''shell''' is simply an '''interface''' to allow a user to communicate with the Linux computer system (server). Linux shells have evolved (improved) over a period of time. You will be using the '''Bash Shell''' which is considered to be ''user-friendly''. By understanding how to issue Linux commands, you can create a file that contains Linux commands (called a '''shell script''') later in this course to automate tasks to make you a more '''productive''' Linux user and system administrator.
:* Issuing '''Linux commands'''
:* Becoming productive using the Linux '''command prompt''' ('''shell''')
:* Performing '''Linux Tutorials''' ('''11Weekly Tutorials x 2% = 22% of your final grade''')
:* Performing '''Linux Practice Questions'''
:* Performing '''Review Tutorial Questions''' ('''28 Sections x 1% = 8% of your final grade''')
===Connecting to the Seneca Student VPN===
[[Image:gp1.png|thumb|right|130px|'''Seneca Student VPN''' ]]
Seneca College is "rolling-out" additional measures to improve '''network security'''. One of these measures is to implement '''multi-factored authentication'''. As of '''September 2020''', all All Seneca College students are required to connect to the '''Seneca Student VPN''' in order to be able to connect to their '''Matrix''' Linux accountwhen outside of campus as a '''network security''' measure.<br><br>The Seneca Student VPN uses multi-factor authentication (MFA) when logging in to verify you are who you say you are. ''<b>Multi-factor authentication</b> is an electronic authentication method in which a computer user is granted access to a website or application only after successfully presenting two or more pieces of evidence (or factors) to an authentication mechanism: knowledge (something the user and only the user knows).'' Reference: https://en.wikipedia.org/wiki/Multi-factor_authentication<br><br> You should have received an email e-mail message (also available in course announcements) regarding with instructions on how to setup set up your Smart Phone to connect and valid via the Seneca Student VPNsmartphone for multi-factor authentication. '''NOTE:''' If you haven't done this installed it yet, please perform the steps provided in do so by following the following linkITS instructions here:<br>https://students.senecacollege.ca/spaces/186/it-services/wiki/view/1025/student-vpn<br><br>
In the next investigation, you will learn how to '''connect''' to and '''login''' to your Matrix server account from a remote computer<br>such as your '''home desktop computer''', '''laptop''' or '''tablet''' computer.<br><br>
===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''': Effective '''May 9, 2022''' - this online This weekly tutorial will be required to must be completed by<br>'''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>
# Start your workstation in your lab and login to your Seneca Windows account.<br><br>
# Make certain that the '''MyApps''' window is open. This window should have opened shortly after you logged into your Windows workstation. If the application windows is not open, click on the '''MyApps''' icon on the desktop to launch).<br><br>[[Image:ssh-main-window.png|thumb|right|150px|SSH Client Application Window ]]<span style="color:red;font-weight:bold;">NOTE: You may be required to validate in order to use MyApps correctly. If you see near the top of the screen "requires validation", then click on that area to connect to validate.</span><br><br>
# Click on the '''Search Apps''' area located in the top right corner of the MyApps window and type the word: <span style="color:blue;font-weight:bold">ssh</span><br><br>
# Several SSH applications will appear. <br><br>'''NOTE:''' All of these applications allow you to connect to your Matrix account.<br>We will use the application called '''SSH Secure Shell Client''' for this practice tutorial.<br><br>
# 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 =
 
<br>
In this investigation, you will learn how to use the Linux Shell. Topics in the section include:
:* Learn how to get '''help''' for Linux commands via the '''online manual''' (i.e. '''man''' command).
:* Perform '''Basic Shell Editing'''
:* Issue a '''program''' to confirm that you connected to your Matrix account<br><br> ==Linux Command Structure== The Bash shell allows you to interact with Linux by typing commands. '''The basic Linux command structure is as follows:'''
The Bash shell in Matrix allows you to interact with your Matrix account by issuing commands<span style="font-family:courier;color:blue;font-weight:bold">command argument1 argument2 ... </span>
Some Linux commands can be used as-is (e.g. '''pwd''', '''date''', 'The General ''ls''', '''cal'''), but many Linux Command Structure is as follows:commands can also be issued with arguments (e.g. '''cal 2002''', '''cd /bin''', '''<br><span style="fontls -family:courier;color:blue;fontl -weight:bold">command argument1 argument2 .a /bin''' ).. </span>
Some Linux commands can be issued by entering the Linux command line without arguments (e.g. '''pwd''', '''date''', '''ls''', '''cal'''),<br>but many Linux commands can be issued with arguments (e.g. '''cal 2002''', '''cd /bin''', '''ls -l -a /bin''' ).<br><br>'''What Does is an Argument Representargument?'''
An argument is used to change the default behaviour of a command. Arguments come in three major forms: # A command '''argumentoption''' can respresent.#* Example:<code>-l</code>:* a # A '''file pathname'''.#* Example:* a command '''option'''<code>/etc</code>:* a # A series of characters (i.e. '''text''') that the command can use .#* Example: <code>"Hello, world."</code>
An '''argument''' is <u>must be separated</u> from a command (or and from other arguments) by whitespace (a '''SPACE''', '''MULTIPLE SPACES''' or a '''TAB''').<br><br>
'''Perform the Following Steps:'''
# Make certain Confirm that you are logged into your Matrix account.<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">pwd</span><br><br>#* '''Explanation:''' The output from this Linux command basically shows your '''current location''' in on the Matrix server(otherwise known as your '''p'''resent '''w'''orking '''d'''irectory).<br>This represents a '''directory pathname''' to your home directory. We will discuss ''pathnames'' later in this course.<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">ls</span><br><br>#* '''Question:''' What do you notice?<br><br>#* '''Answer:''' If there were are any files in your home directory, just only their file names would be are displayed.<br><br># Issue Change your directory location by issuing the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cd /binetc</span><br><br># Issue the following Linux command to confirm your changed current location: <span style="font-family:courier;color:blue;font-weight:bold">pwd</span>#* '''Result:''' Your Linux session should display <brcode>/etc/<br/code>when running this command. If your output is different, retrace your steps to make sure you haven't skipped anything or had a typo in a command.# Issue the following Linux commandagain: <span style="font-family:courier;color:blue;font-weight:bold">ls</span><br><br>#* '''Question:''' What do you notice?<br><br>How is this different from the last time you ran it?# Issue Re-run the following Linux ls command using an '''option''': <span style="font-family:courier;color:blue;font-weight:bold">ls -l</span><br><br>#* '''Question:''' What do you notice?<br><br>#* '''Answer:''' The '''-l''' option combined with the '''ls''' command provides displays a '''detailed''' ("''long''") listing of the same files , providing you with more information on a separate line for about each file.<br><br>This is called metadata (data about data), and includes information such as last modified date, file size, ownership and permissions.# Issue the following Linux command to return Return to your home directory: <span style="font-family:courier;color:blue;font-weight:bold">cd</span><br><br># Issue the following Linux command Now confirm you've changed back to confirm your current locationhome directory: <span style="font-family:courier;color:blue;font-weight:bold">pwd</span>#* '''Result:''' The shell should display <brcode>/home/''yourusername''<br/code># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">ls /bin</span><br><br> # Issue the following Linux command to confirm your current location: <span style="font-family:courier;color:blue;font-weight:bold">pwd</span><br><br>#* '''Question:''' What do you notice?<br><br>#* '''Question:''' What makes this command with that argument useful if you are current currently located in your home directory?<br><br># Issue a Linux command that you have already learned to change to your '''home''' directory<br>and to '''confirm''' that you have returned to your home directory.<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">clear</span><br><br>#* '''Question:''' What do you notice? How would Why is this command be helpful?<br>#* '''FYITip:''' The short-cut shortcut keys to clear the screen for the Bash shell isare: <span style="font-family:courier;color:font-weight:bold">ctrl-l</span><br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">who</span><br><br>#* '''Question:''' What information does this command show?<br><br>#* '''Answer:''' This command lists users that are logged into the same Matrix Linux server as yourself.<br>#* '''NOTE:''' Remember that the Matrix Linux cluster contains several servers, so it does not (or nodes). It won't display<br>all users that are logged onto those other machines within that into the cluster!<br><br>, only the ones on the same node as you. # Issue the following Linux command: <span style="color:blue;font-weight:bold">whoami</span><br><br>#* '''Question:''' What does this command display? #* '''Question:''' What do you think is the purpose of this command?<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cal</span><br><br>#* '''Question:''' What is the purpose of does this commanddo?<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cal 20212035</span><br><br>What #* '''Question:''' How and why is the purpose of this command using this argumentoutput different?<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cal 2 20212035</span><br><br>What is the purpose of this command using those two #* '''numbersQuestion:''' as argumentsWhat do each of these numbers do?<br><br>#* '''Getting Help with Linux CommandsQuestion:'''What do you think would happen if you reversed the order of those arguments? (i.e. cal 2035 2)
With the Linux OS containing over '''2500''' commands and utilities, it is good for a Linux user or <br>Linux system administrator (sysadmin) to learn about how to use commands “on-the-fly”.<br><br>The '''man''' command can provide information on how to use a command<br>(i.e. '''command usage''', '''acceptable command arguments''', '''command options''', '''examples''').<br><br># Issue the following command: <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 the '''SPACE''' key to move to the next screen.<br><br>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 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># Press the letter <span style="font-family:courier;color:blue;font-weight:bold">q</span> to exit the man command.<br><br># Issue the following Linux command to get help Getting 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 and note the '''option letters''' that correspond to the following descriptions:<br><ul><li>"'''use a long lising 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 <u>each</u> of those option letters you noted in '''step 4''' to see how this command differs for 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>How does this ''pipeline command'' make it easier to obtain information regarding man command?<br><br># If you wish to change your password, you can change it by issuing the command: <span styleCommands="font-family:courier;color:blue;font-weight:bold">passwd</span><br>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># Press the letter <span style="font-family:courier;color:blue;font-weight:bold">q</span> to exit the man command.<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>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.<br><br>
With the Linux OS containing over '''Command Line Editing2500'''[[Image:commandcommands and utilities, it's important for Linux users and Linux system administrators (sysadmin) to learn how to use commands “on-linethe-editing.png|thumb|right|520px|Command Line Editing Shortcut Keysfly”. ]]
The '''man''' utility is an interactive collection of manual pages that provides information on how to use a given command (i.e. '''command usage''', '''acceptable command arguments''', '''command options''', '''examples''').
Learning # For an example, issue the following command for the manual page about the manual utility: <span style="font-family:courier;color:blue;font-weight:bold">man man</span>#* You may notice that the online manual categories commands into sections or '''numbered volumes'''.# Press the '''SPACE''' key to move to the next screen.#* '''Question:''' How many '''volume numbers''' are contained in the man pages (like '''executable commands''', '''games''', or '''system administrator commands''')?# You can use the following '''shortcut keys''' in any OS within the man command to help navigate throughout this utility to get help with the ls command (refer to table below):#::<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># If you are connected to Matrix through a terminal will allow application, you can also use your mouse's scroll wheel.# Press the <span style="font-family:courier;color:blue;font-weight:bold">q</span> key to be more productive as exit the man command.# Use the ''man'' utility to get help with the ''ls'' command: <span style="font-family:courier;color:blue;font-weight:bold">man ls</span># Navigate through the '''ls''' manual page and write down the '''option letters''' that correspond to the following descriptions:#*"'''use a long listing format'''Linux user"#*"'''do not ignore entries starting with .'''" (i.e. hidden files)#*"'''sort by file size'''"#*"'' or 'append indicator (one of */=>&|) to entries'Linux System Administrator'' " (commonly referred i.e. type of file)# Exit the man utility.# Issue the '''ls''' command using <u>each</u> of those option letters you noted in '''step 5''' to assee how the command's output changes with each option.#* '''NOTE: '''The '''man''' utility can be used with the '''-k''' option to help list Linux sysadmincommands that match a text pattern that is contained within the help screen for a Linux command.# '''Pipeline commands''' can be used to filter-out unnecessary output. In the next command that you will be issuing, 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" (The number "8" refers to the category of type of command - in this case, administration commands).We will learn more about pipeline commands later in this course.# Issue the following Linux pipeline command: <brspan style="font-family:courier;color:blue;font-weight:bold">man -k user | grep 8<br/span>#* '''Question:''' How does this ''pipeline command'' make it easier to obtain information regarding man command?# If you wish to change your password on typical Linux systems, you can 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>Letcommand on Matrix!|Unique to this college, your Linux password is changed automatically when you change your 's learn a few common Bash Shell keyboard shortcut keys and find out where you 'myseneca'' password.}}#* '''Question:''' What option for the ''passwd'' command can access online help for additional shortcuts be used to change user info (if requiredsuch as name)?#* '''Hint:''' use the '''man''' command for '''passwd'''.# Press the <span style="font-family:courier;color:blue;font-weight:bold">q</span> key to exit the man command.
You will now learn how to perform '''command line editing''' to correct syntax errors while typing Linux commands PRIOR to pressing the ENTER key.
==Command Line Editing==
[[Image:command-line-editing.png|thumb|right|520px|Command Line Editing Shortcut Keys. ]]
Learning '''shortcut keys''' in any OS terminal will allow you to be more productive as a ''Linux user'' or ''Linux System Administrator'' (commonly referred to as: '''Linux sysadmin''').
 
Let's learn a few common Bash Shell keyboard shortcut keys and find out where you can access online help for additional shortcuts (if required).
'''Perform the Following Steps:'''
# Press the <span style="font-family:courier;color:blue;font-weight:bold">up arrow</span> key combination, and see what happens when you press <span style="font-family:courier;color:blue;font-weight:bold">BACKSPACE</span> , <span style="font-family:courier;color:blue;font-weight:bold">&lt;ctrl&gt;&lt;BACKSPACE&gt;</span> and <span style="font-family:courier;color:blue;font-weight:bold">&lt;ctrl&gt;&lt;h&gt;</span>.<br>Why is it important to know those series of key combinations?<br><br>
# Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-u</span> key combination to clear the line.<br><br>
# Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-l</span> key combination. What happens? What is the advantage of using '''ctrl-u''' as opposed to '''ctrl-l'''?<br><br>The Bash shortcut keys that you just learned are sufficient to perform Bash Shell editing.<br>Although you are NOT required to learn other short-cut keys, here is a link to a listing in case you are interested:<br>[https:// ostechnix.com/list-useful-bash-keyboard-shortcuts/ Useful Bash Shell Keyboard Shortcuts]<br><br>'''Running a Shell Script to Check Student Online Tutorial Participation'''
Some 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.==Tutorial Submission==
These programs (known as '''Running a Shell Scripts) will 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 your work and offer feedback if you made mistakespass, so you then user performed can make correctionsproceed.]]<br/td>Making corrections (i<td>[[Image:script-check-2.e. troubleshooting) png|thumb|right|450px|If there is a warning, then feedback is provided to user to correct and re-running these run checking programs until you are successful will help studentsscript.]]</td><br/table>gain "hands-on" experience as well as "trouble-shooting experience.
Students whose professors do NOT assign marks for Professors will require students successfully perform these online tutorials are encouraged to perform them for "hands-on" practicemarks (within a deadline). The checking program for this In order to confirm that you successfully performed a tutorial is just showing proof that , you were able will be required to connect run a program (or in later tutorials, several programs) to your Matrix account from your home computerprove 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. 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://ictwiki.cdot.senecacollege.ca/~murray.saululi101/uli101files/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:'''
# What character(s) are used to '''separate''' commands and arguments?
# Create a '''table''' listing each Linux command, useful options that were mentioned in this tutorial for the following Linux commands:<br>'''pwd''' , '''cd''' , '''ls''' , '''cal''' , '''date''' , '''who''' , '''w''' , '''whoami''' , '''who am I''' , '''clear'''
 
_________________________________________________________________________________
 
Author: Murray Saul
 
License: LGPL version 3
Link: https://www.gnu.org/licenses/lgpl.html
 
_________________________________________________________________________________
 
[[Category:ULI101]]