-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
239 lines (214 loc) · 11.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Intro to Terminal : Setup ~ Girl Develop It</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/gdiaa.css" id="theme">
<link rel="stylesheet" href="lib/css/light.css">
<link rel="stylesheet" href="css/print/pdf.css" media="print">
<script src="lib/js/head.min.js"></script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Opening slide -->
<section>
<img src="images/gdi_logo_badge.png" class="img--bare" height="450px" />
<div class="box--small">
<h3><span class="blue">Intro to Terminal</span></h3>
</div>
</section>
<section>
<h3>What is the terminal?</h3>
<div class="box copy--small">
<p>The terminal is an interface for typing and executing <span class="blue">text-based commands</span> for your computer to follow.</p>
<p class="box">Many of the things that you can do with GUI tools,<br/>you can do via text command in the terminal.</p>
<p class="box copy--small">For example: creating folders, moving through directories, creating files, deleting folders ands files, requesting web resources, executing code.</p>
</div>
</section>
<section>
<h3>What is the terminal?</h3>
<div class="box copy--small">
<p class="green">The key to becoming comfortable in the terminal is realizing that - when "in terminal", you are simply "in" your computer's file system.</p>
<p class='box copy--small'>Just like you would open Finder (OS X) or Explorer (Windows) and move from directory to directory, much of working in the terminal is navigating your computer's file system.</p>
</div>
</section>
<section>
<h3>Intro to Terminal</h3>
<div class="box copy--small">
<p><i>Working in the terminal can be really intimidating - at first!</i></p>
<p class="box">But with practice, things like <span class="blue">folder navigation and file manipulation</span><br/>can be <i>significantly</i> <span class="green">faster in the terminal</span> than in the GUI.</p>
<p>Professional software developers use the terminal <b>all the time</b>,<br/>and this class will require some use of it.</p>
</div>
</section>
<section>
<h3>Intro to Terminal</h3>
<div class="box">
<p><b>Mac & Linux users:</b> Open <strong>Terminal</strong>
<br/><small>Applications > Utilities > Terminal</small></p>
<p class="box--small"><b>Windows users:</b> Install & Open <strong><a href="http://git-scm.com/download/win" target="_blank">Git-Bash</a></strong>*</p>
<br >
<p class="copy--xsmall">* We will not be using Windows' "Command Prompt" terminal program,<br/>as it uses a different syntax than *NIX (Unix - OSX, Linux) systems.</p>
</div>
</section>
<section>
<h3>Intro to Terminal Prompt</h3>
<div class="box--small copy--small">
<p>The line that appears in the terminal when you open it is called<br/><em span class="green">the prompt</em>.</p>
<p class="box--small">It usually contains information about the <strong>user and current directory</strong>.</p>
<p class="box--small copy--small">It can be customized. So it might not look the same everywhere you see one.</p>
<img src="images/prompt1.png" alt="example prompt">
<img src="images/prompt2.png" alt="example prompt">
<img src="images/prompt3.png" alt="example prompt">
<img src="images/prompt4.png" alt="example prompt">
<img src="images/prompt5.png" alt="example prompt">
<p class="box--small"><strong>Terminal instructions</strong> often start a line with a <code>$</code>.<br/><small>This just represents the last character in the prompt, you don't have to type it.</small></p>
</div>
</section>
<section>
<h3>Terminal Cheatsheet</h3>
<table style="font-size: 20px; line-height: 1.4em;">
<tr>
<td style="padding-bottom: .5em;"><code>.</code></td>
<td>the current directory- ex: <code>touch ./wow.txt</code></td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>..</code></td>
<td>the parent of current directory - ex: <code>cd ../RubyParty</code></td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>~</code></td>
<td>the root directory- ex: <code>cd ~/Pictures</code></td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>cd [location]</code></td>
<td>"change directory" to [location]</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>pwd</code></td>
<td>"present working directory" - where am I?</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>ls -la</code></td>
<td>"list all" of the contents of current directory, including invisible ones</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>touch [filename.extension]</code></td>
<td>create a file called [filename.extension] in the current directory</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>mkdir [directoryname]</code></td>
<td>create a directory called [directoryname] in the current directory</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>rm [filename]</code></td>
<td>"remove" (delete) the file called [filename]</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>rm -rf [directoryname]</code></td>
<td>"remove recursively with force" the directory called [directoryname]<br/> <small><em>With great power comes great responsibility. <strong>Be very careful with this one.</strong></em></small></td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>clear</code> OR <code>cmd+k</code></td>
<td>clear the terminal screen</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>help</code></td>
<td>lists all possible commands</td>
</tr>
<tr>
<td style="padding-bottom: .5em;"><code>man [command]</code></td>
<td>displays the manual for [command]</td>
</tr>
</table>
</section>
<section>
<h3>Terminal Activities</h3>
<p class="box--small">Try out the following commands!<br/><small>Things that start with <code>#</code> are comments - you don't need to type those out.</small></p>
<pre><code class="terminal">
# navigate to your desktop
cd ~/Desktop #Linux, Mac
cd desktop #Windows
# make a directory called terminal_adventures
mkdir terminal_adventures
# navigate into the new terminal_adventures directory
cd terminal_adventures
# create a new file in the current (terminal_adventures) directory
touch hello.txt
# list the contents of the current (terminal_adventures) directory
ls
</code></pre>
</section>
<section>
<h3>Terminal Activities</h3>
<p class="box--small copy--small">Not sure what a command does? Or how it works? Use <code>man</code><br/><small>Try using <code>man</code> with a few commands. Type the letter <code>q</code> to exit <code>man</code>.</small></p>
<pre style="height: 30px; overflow:hidden;"><code class="terminal">
man ls
</code></pre>
<p>Output:</p>
<img src="images/manls.png" >
</section>
<!-- Let's Develop It - 10 min -->
<section>
<h3>Let's Develop It!</h3>
<p class="box--small"><b>Working in the terminal</b>, create a directory called <code>gdi_terminal</code> in the location of your choosing.<br/> <small>Desktop? Documents? Somewhere you'll be able to find it again!</small></p>
<p class="copy--small">Inside the <code>gdi_terminal</code> directory, create a file called <code>setup.txt</code>.</p>
</section>
<section>
<h3>You're all set up!</h3>
</section>
<section>
<h3>Questions?</h3>
<p class="box copy--small">Message us in the Slack channel for your workshop.<br/><small>Get your Slack invite here: <a href="https://gdiaa-slack.herokuapp.com/" target="_blank">https://gdiaa-slack.herokuapp.com/</a></small></p>
</section>
<section>
<h3>Homework</h3>
<p class="box--small copy--small"><strong>Practice:</strong> spend at least a few minutes practicing navigating and creating/removing documents and directories with the command line.</p>
</section>
<!-- Opening slide -->
<section>
<img src="images/gdi_logo_badge.png" class="img--bare" height="450px" />
<div class="box--small">
<h3><span class="blue">Intro to Terminal</span></h3>
</div>
</section>
</div>
<footer>
<div class="copyright">
Intro to Terminal ~ GDI Ann Arbor ~
<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/3.0/80x15.png" /></a>
</div>
</footer>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
rollingLinks: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>