Changes

Jump to: navigation, search

Tutorial 1: Using Your Matrix Server Account

8 bytes added, 15:25, 13 May 2023
INVESTIGATION 2: USING THE LINUX SHELL
=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 in Matrix allows you to interact with your Matrix account by issuing commands.
# Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cal 2021</span><br><br>What is the purpose of this command using this argument?<br><br>
# Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cal 2 2021</span><br><br>What is the purpose of this command using those two '''numbers''' as arguments?<br><br>
'''==Getting Help with Linux Commands'''==
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>
# 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 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>'''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> 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.<br><br>
'''==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''').
 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''').<br><br><br>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> ==Tutorial Submission== 
'''Running a Shell Script to Check Student Online Tutorial Participation'''

Navigation menu