Changes

Jump to: navigation, search

Tutorial 1: Using Your Matrix Server Account

123 bytes added, 15:29, 15 January 2021
Part 1: Using the Linux Shell
</td>
<td>
*Launch Click ''Launchpad'Terminal'icon, type '' from the 'terminal''finder'<br>and press '''ENTER''' utility
*In the terminal, enter the following command:<br><span style="color:blue;font-weight:bold;font-size:.75em;">ssh senecausername@matrix.senecacollege.ca</span>
</td>
<td>
*From the menu, choose:<br>'''Applications''' > '''System Tools''' > '''Terminal'''.
*In the terminal, enter the following command:<br><span style="color:blue;font-weight:bold;font-size:.75em;">ssh senecausername@matrix.senecacollege.ca</span>
</td>
:* Learn the basic '''Linux command structure''' (''arguments'' and ''options'')
:* Learn how to get '''help''' for Linux commands via the '''online manual''' (i.e. '''man''' command).:* Learn Perform '''Basic Shell Editing''':* Learn how to perform setup '''online assignmentsassignment 1'''.:* Perform the '''first two sections section''' and '''3 parts of the second section''' of online assignment #1'''.<br><br>
===Part 1: Using the Linux Shell ===
:* a series of characters (i.e. '''text''') that the command can use
An '''argument''' is <u>separated</u> from a command (or from other arguments) by a '''SPACE''', '''multiple spacesMULTIPLE SPACES''' or a '''TAB'''.<br><br>
'''Perform the Following Steps:'''
With the Linux OS containing over '''2500''' commands and utilities, it is good for a Linux user or 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 '''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 with the ls command: <span style="font-family:courier;color:blue;font-weight:bold">man ls</span><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 copy 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 style="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 is changed automatically when you change your '''myseneca''' password.<br><br>You will now learn how to perform '''command line editing''' to correct syntax errors while typing Linux commands PRIOR to pressing the ENTER key.<br><br>
'''Perform the Following Steps:'''
[[Image:meta-key.png|thumb|right|370px|To make '''alt-f''' key work, select '''Edit''' -> '''Settings''' -> '''Keyboard''', and select the checkbox '''Use ALT as Meta key (and Escape)'''.]]
# Type the following Linux command, but DON’T press the ''ENTER'' key:<br><span style="font-family:courier;color:blue;font-weight:bold">cd /bin</span><br><br>
# Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-a</span> key combination. What happens?<br><br>'''NOTE:''' To make '''alt-f''' key work when use the '''GRAPHICAL Windows SSH Client application''', select '''Edit''' -> '''Settings''' -> '''Keyboard''', and select the checkbox '''Use ALT as Meta key (and Escape)'''.<br><br># Press the <span style="font-family:courier;color:blue;font-weight:bold">alt-f</span> key combination '''two times'''<br>(OPTION+right-arrow for Mac OSx).<br><br>What happens?<br><br># Press the <span style="font-family:courier;color:blue;font-weight:bold">alt-b</span> key combination '''one time'''.<br>(OPTION+left-arrow for Mac OSx).<br><br>What happens?<br><br>'''NOTE:''' These short-cut keys should work if you issued the ssh command within a terminal. If you are using a '''graphical''' windows SSH application, would would need to configure the application to understand the ''META'' (alt) key for shortcut commands (i.e. not shortcuts for the ''application menu'').<br><br><table align="right"><tr valign="top"><td>[[Image:ctrl-b.png|thumb|right|150px|'''alt-b''' moves one word backwards for Windows OS]]</td><td>[[Image:ctrl-w.png|thumb|right|150px|'''ctrl-w''' deletes a word to <u>left</u> of the cursor.]]</td><td>[[Image:new-ls.png|thumb|right|150px|After command is deleted, then type new command and press '''ctrl-e''' to move to end of the command line.]]</td></tr></table># Use a combinate of the '''ctrl-a''' and '''alt-f''' keys (or Mac equivalent) until the cursor is to the '''<u>right</u>''' of the '''cd''' command<br><br>
# Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-w</span> shortcut key. What happens?<br><br>
# Type the following command: <span style="font-family:courier;color:blue;font-weight:bold">ls</span><br><br>
In this section, you will learn to:
* '''Select the correct section''' for assignment submission
* Perform the '''first two sectionssection''' and '''3 parts of the second section''' of assignment #1
* '''Verify''' that you successfully completed both sections
* '''Exit''' your online assignment #1.
[[Image:Assn-initial-window3.png|thumb|right|250px|Initial Assignment Window to Allow Student to Select Correct Course Section. ]]
# In your Matrix account, issue the following command:<br><span style="color:blue;font-weight:bold;font-family:courier">~uli101/a1</span><br><br>
# Press '''ENTER''' at the "Notes" screen.<br><br>
# A screen similar to the one displayed on the right will appear.<br><br><span style="color:red;">'''WARNING''': You need to select the <u>CORRECT</u> section for the course which you belong to.<br>If you do <u>NOT</u> select your correct section, your assignment may not be recorded for marks!</span><br><br>
# Select the '''3 letter(s)code''' corresponding to the <u>correct</u> '''ULI101 <u>section</u>''' and '''professor''' and press <span style="color:blue;font-weight:bold">ENTER</span><br><br>
# After you have selected your course section, There will be a screen that provides several important notes before proceeding.<br>Please take a few moments to read those notes and press <span style="color:blue;font-weight:bold">ENTER</span> to proceed.<br><br>[[Image:assn-section-completion.png|thumb|right|250px|Main Assignment Window to View Which Sections Need to be Completed. ]]
# The assignment main menu will then be displayed.<br><br>'''NOTES:'''<ul><li>Near the bottom of the window, you will see '''"You are currently registered to"''' followed by the '''section letter''' and '''instructor name'''. Double-check your course timetable to confirm that this the correct section letter. If you have selected the WRONG section, type <span style="color:blue;font-weight:bold">C</span> in the menu selection area and press <span style="color:blue;font-weight:bold">ENTER</span>. You will return back to the original window to select your correct course section.<br><br></li><li>Near the top of the window displays the sections to complete in the assignment. You are NOT required to complete all sections at the same time. You can check the assignment #1 link on the ULI101 main WIKI page to note the due date for assignment #1. Sections that are NOT completed will be displayed in '''reverse text with a blue background'''. On the other hand, when you compete a section, then the section will appear as regular text<br>(i.e not in reverse text).<br><br>[[Image:assn-completed-window.png|thumb|right|250px|Main Assignment Window to Confirm Which Sections Have or Have Not Been Completed. ]]</li><li>If you want to verify that you have completed sections for the assignment, look for the text '''"Marks earned so far for ULI101 Assignment:"''' and it will show how many sections have been completed. When it shows all sections completed, then your assignment is finished and you should receive full marks provided that you have selected your correct course section.<br><br></li></ul>
13,420
edits

Navigation menu