Changes

Jump to: navigation, search

Tutorial 1: Using Your Matrix Server Account

500 bytes added, 14:54, 3 January 2021
Part 1: Using the Linux Shell
# Make certain 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>The output from this Linux command basically shows your current location in the Matrix server.<br>This represents a directory pathname to your home directory. We will discuss this later in a future tutorial.<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">ls</span><br><br>What do you notice?<br><br>If there were any files in your home directory, just their file names would be displayed.<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">cd /bin</span><br><br>
# Issue the following Linux command to confirm your current location: <span style="color:blue;font-weight:bold">pwd</span><br><br>
# Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">ls</span><br><br>What do you notice?<br><br># Issue the following Linux command using an '''option''': <span style="font-family:courier;color:blue;font-weight:bold">ls -l</span><br><br>What do you notice?<br><br>The '''-l''' option with the '''ls''' command provides a detailed ("long") listing of files providing more information on a separate line for each file.<br><br># Issue the following Linux command to return to your home directory: <span style="font-family:courier;color:blue;font-weight:bold">cd</span><br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">ls /bin</span><br><br>What do you notice? What makes this command with that argument useful if you are current located in your home directory?<br><br>
# Issue a Linux command that you have already learned 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>What do you notice? How would this command be helpful? '''FYI:''' The short-cut keys to clear the screen for the Bash shell is: '''ctrl-l'''<br><br># Issue the following Linux command: <span style="font-family:courier;color:blue;font-weight:bold">who</span><br><br>What information does this command show?<br><br>This command lists users that are logged into the same Matrix server as yourself.<br>'''NOTE:''' Remember that the Matrix Linux cluster contains several servers, so it does not display<br>all users that are logged onto those other machines within that cluster!<br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold">whoami</span><br><br>What does this command display? 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>What is the purpose of this command?<br><br># 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 1 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 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 (i.e. '''usage''', '''arguments''', '''options''', '''examples''').<br>The commands are classified into sections or '''volumes'''.<br><br>
# Issue the following command: <span style="font-family:courier;color:blue;font-weight:bold">man man</span><br>How many volume numbers are contained in the man pages (like '''executable commands/programs''', '''games''', or '''system administrator commands''')?<br><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>'''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>
# 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>
[[Image:command-line-editing.png|thumb|right|520px|Command Line Editing Shortcut Keys. ]]
# Type the following Linux command, but DON’T press the ENTER key:<br><span style="font-family:courier;color:blue;font-weight:bold">ls -l -a /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># 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). What happens?<br><br>NOTE: This short-cut key 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<br><br># Press the <span style="font-family:courier;color:blue;font-weight:bold">alt-b</span> key combination once<br>(OPTION+left-arrow for Mac OSx). What happens?<br><br># Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-w</span> shortcut. What happens?<br><br>
# Type the following command: <span style="color:blue;font-weight:bold">ls</span><br><br>
# Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-e</span> key combination and press <span style="color:blue;font-weight:bold">ENTER</span><br><br>
# Press the up arrow key. What happens?<br><br>
# Press the <span style="font-family:courier;color:blue;font-weight:bold">ctrl-u</span> key combination. What happens?<br><br># 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="color:blue;font-weight:bold">BACKSPACE</span> , <span style="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 this key combination then issuing the '''clear''' command?<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/
<br>
13,420
edits

Navigation menu