-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1355 lines (1152 loc) · 34.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>command-line-introduction</title>
<meta name="author" content="itspoma, cursor.education school">
<meta name="keywords" content="">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="http://cursor-education.github.io/style/reveal/css/reveal.css">
<link rel="stylesheet" href="http://cursor-education.github.io/style/reveal/css/theme/cursor-education.css" id="theme">
<link rel="stylesheet" href="http://cursor-education.github.io/style/reveal/css/theme/cursor-education-more.css" id="theme">
<link rel="stylesheet" href="http://cursor-education.github.io/style/reveal/lib/css/zenburn.css">
<!--[if lt IE 9]>
<script src="http://cursor-education.github.io/style/reveal/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section
data-background="assets/slide0-bg.png"
data-background-repeat="repeat"
data-opacity="0.3"
style="background: rgba(0,0,0,0.8)"
class="slide0-black"
>
<h2 style="color:white">Command Line Introduction</h2>
<small>
<a href="http://github.com/itspoma" target="_blank">@itspoma</a>
/
<a style="display:inline-block" href="http://cursor.education/" target="_blank">CURSOR Education School</a>
</small>
<br/>
<small style="color:#777; font-size:17px">
v1.5
</small>
<aside class="notes">
<pre>
It's time to get acquainted with your command line
and learn the commands that you'll actually need to use
</pre>
</aside>
</section>
<section style="text-align:left;">
<h2>Agenda</h2>
<p>
<ul>
<li>Shell introduction
<li>Shell evolution
<li>File system organization
<li>Basic command (Paths, Navigation, Files, etc)
<li>Manipulation (viewing and changing)
<li>Environment variables
<li>Pipes And Redirection
<li>The Super User
</ul>
</p>
</section>
<section>
<section>
<h2>What Is "The Shell"?</h2>
<p>
<div style="text-align:left">
program,<br/>
that takes commands from the keyboard,<br/>
perform operations,<br/>
gives output<br/>
</div>
</p>
</section>
<section>
<h2>What's a "Terminal"?</h2>
<p>
<div style="text-align:left">
terminal emulator<br/>
is a program,<br/>
that opens a window,<br/>
and lets you interact with the shell<br/>
</div>
</p>
</section>
<section>
<h2>Philosophy</h2>
<p>
<img class="no-border" src="http://new.tinygrab.com/7020c0e8b0a6393bcb9d14dd716b501963a9bce1a2.png" />
<br/>
<ul>
<li>program do one thing,
<li>programs works together,
<li>programs handle text streams
</ul>
</p>
<aside class="notes">
<pre>
Doug McLiroy - inventor of Unix Pipes
</pre>
</aside>
</section>
<section>
<h2>Command Line Interface (CLI)</h2>
<p>
text-way to interact with PC
<br/>
<div>
<img style="float:left; width:48%; margin-right:5px;" src="https://cdn.tutsplus.com/mac/uploads/2013/06/terminal_ls-l.png" />
<img style="float:left; width:48%;" src="http://www.guidebookgallery.org/pics/gui/system/utilities/commandprompt/winnt40.png" />
</div>
<br style="clear:both;" />
<ul style="font-size:25px">
<li>Terminal on a Mac
<li>Command Prompt on Windows
<li>PowerShell on Windows
</ul>
</p>
<aside class="notes">
<pre>
the command line is a bit intimidating
text-only way of browsing and interacting with your computer
no mouse, no icons, nothing but text
DOS prompt > boot PC > C:>
That’s an example of the command line!
window into your computer
</pre>
</aside>
</section>
<section>
<h2>CLI: Purpose</h2>
<p>
<ul>
<li>jump between files and directories
<li>open stuff up
<li>run simple scripts
<li>check the status of things
<li>...
</ul>
</p>
<aside class="notes">
<pre>
You'll become very familiar with those commands
</pre>
</aside>
</section>
<section>
<h2>What is the Command Line?</h2>
<p>
<small>
Command Line<br/>
Bash<br/>
Bourne-Again SHell<br/>
Unix Shell<br/>
</small>
<br/>
<img class="no-border" src="http://1.bp.blogspot.com/-y_Qcr6C4aTQ/UB5xcCxM3ZI/AAAAAAAABSk/29C-JeH68Nk/s1600/Pretty+Terminal+Mac.png" />
</p>
<aside class="notes">
<pre>
text-based shell for controlling the computer
program itself that
gives us a window into our OS
and lets us run commands
navigate your file system
just like you would by double clicking on folder icons in the Finder
</pre>
</aside>
</section>
<section>
<h2>Anatomy of prompt</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
Romans-Macbook-Pro:~ somename$
<computer-name>:<current-directory> <username>$
<computer-name>:<current-directory> <superuser>#
</code></pre>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
<section>
<h2>Starting A Terminal</h2>
<p>
<ul>
<li><b>Windows</b>:<br/>
Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt
<li><b>Windows</b>:<br/>
Wnd+R, then write "cmd", and hit Enter
<li><b>Mac</b>:<br/>
Using CMD+SPACE, find and run a "Terminal" application
</ul>
<br/>
<br/>
<img class="no-border" src="https://viking_education.s3.amazonaws.com/web_development/prep_basics/terminal_icon_in_dock.png" />
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
<section>
<h2>Testing The Keyboard</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$
[me@linuxbox me]$ kdkjflajfks
bash: kdkjflajfks: command not found
</code></pre>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
</section>
<section>
<section>
<h2>Thompson shell (1971)</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
команда1> команда2>
команда1 | команда2
</code></pre>
</p>
<aside class="notes">
<pre>
first shell in Unix 1971 y
</pre>
</aside>
</section>
<section>
<h2>Bourne Shell (sh) (1977)</h2>
<p>
<ul>
<li>filters
<li>flow control & variables
<li>I/O control
<li>SIGNAL control
<li>optimizations (command-length max, etc)
<li>2>
</ul>
</p>
<aside class="notes">
<pre>
Unix 7, 1977
AT&T
/bin/sh
скриптова мова
</pre>
</aside>
</section>
<section>
<h2>Bourne again shell (bash) (1987)</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
#!/bin/bash
echo Hello World!
</code></pre>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
<section>
<h2>Korn-shell (ksh) (1983)</h2>
<p>
<img class="no-border" src="https://upload.wikimedia.org/wikipedia/commons/1/16/OpenBSD_ksh_Interaction.png" />
</p>
<aside class="notes">
<pre>
over bash
1983
Devid Korn AT&T
</pre>
</aside>
</section>
<section>
<h2>TENEX C Shell (tcsh)</h2>
<p>
<img class="no-border" src="https://upload.wikimedia.org/wikipedia/commons/f/f7/Tcsh_screenshot.png?uselang=ru" />
</p>
<aside class="notes">
<pre>
over bash
Can Greag AT&T
autocompl (tab)
spellchecking
events
last update 2012
</pre>
</aside>
</section>
</section>
<section>
<section>
<h2>File system (Windows)</h2>
<p>
<img class="no-border" src="https://dvanderboom.files.wordpress.com/2008/03/filesystemtree.png" />
</p>
<aside class="notest">
<pre>
hierarchical directory structure
</pre>
</aside>
</section>
<section>
<h2>File system (Unix)</h2>
<p>
<img class="no-border" src="http://linuxcommand.org/images/file_manager.jpg" />
</p>
</section>
<section>
<h2>File system (Unix)</h2>
<p>
<img class="no-border" src="http://www.openbookproject.net/tutorials/getdown/unix/images/lesson2/UnixDirectoryTree.png" />
</p>
</section>
<section>
<h2>File system (Unix): A Guided Tour</h2>
<p>
<table style="font-size:28px">
<tbody>
<tr>
<td>/</td>
<td>the root directory</td>
</tr>
<tr>
<td>/boot</td>
<td>Linux kernel and boot loader files</td>
</tr>
<tr>
<td>/etc</td>
<td>the configuration files for the system</td>
</tr>
<tr>
<td>/bin, /usr/bin</td>
<td>contain most of the programs for the system</td>
</tr>
<tr>
<td>/sbin, /usr/sbin</td>
<td>programs for system administration</td>
</tr>
<tr>
<td>/usr</td>
<td>variety of things that support user applications</td>
</tr>
<tr>
<td>/var</td>
<td>contains files that change as the system is running (/var/log)</td>
</tr>
<tr>
<td>/home</td>
<td>users keep their personal work</td>
</tr>
<tr>
<td>/tmp</td>
<td>for temporary files</td>
</tr>
</tbody>
</table>
</p>
</section>
</section>
<section>
<section>
<h2>Taking a Look Around</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ command -options arguments
</code></pre>
<pre><code data-trim contenteditable style="padding:20px">
$ echo "hello world"<enter>
$ ls -la
$ cd My\ Folder\ Name
</code></pre>
Documents != documents
</p>
</section>
<section>
<h2>$ pwd</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ pwd
/home/me
</code></pre>
</p>
</section>
<section>
<h2>$ ls</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ ls
Desktop Xrootenv.0 linuxcmd
GNUstep bin nedit.rpm
GUILG00.GZ hitni123.jpg nsmail
</code></pre>
</p>
</section>
<section>
<h2>$ ls</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ ls
$ ls /bin
$ ls -l
$ ls -l /etc /bin
$ ls -la ..
</code></pre>
</p>
</section>
<section>
<h2>$ cd</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ cd /usr/bin
[me@linuxbox bin]$ pwd
/usr/bin [me@linuxbox bin]$ ls
[ lwp-request
2to3 lwp-rget
2to3-2.6 lxterm
a2p lz
aalib-config lzcat
aconnect lzma
acpi_fakekey lzmadec
acpi_listen lzmainfo
add-apt-repository m17n-db
addpart magnifier
and many more...
</code></pre>
</p>
</section>
<section>
<h2>$ file</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ file <name_of_file>
</code></pre>
</p>
</section>
<section>
<h2>Basic commands (Unix)</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ pwd
$ hostname
$ mkdir
$ cd
$ ls
$ rmdir
$ cp
$ mv
$ cat
$ find
$ grep
$ man
$ env
$ echo
$ exit
$ sudo
$ chmod / chown
</code></pre>
</p>
</section>
<section>
<h2>Man Pages</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ man ls
</code></pre>
<img style="margin-top:-40px" class="no-border" src="http://img.bhs4.com/E2/5/E25B9DE3F054B4B30B39B0D0DD5F077A04FBEE91_large.jpg" />
</p>
</section>
<section>
<h2>What is your computer name?</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ hostname
Zeds-MacBook-Pro.local
</code></pre>
</p>
</section>
<section>
<h2>Where are we now?</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ pwd # Your Current Directory
/Users/zedshaw
$ ls # View Directory Contents
$ ls <directory-name>
$ ls -la
$ ls -la .
$ ls -la *.txt
$ open . # Open a file/directory
</code></pre>
</p>
</section>
<section>
<h2>Manipulating with patterns</h2>
<p>
<table>
<tr>
<td>*</td>
<td>everything</td>
</tr>
<tr>
<td>g*</td>
<td>everything that begins with character "g"</td>
</tr>
<tr>
<td>b*.txt</td>
<td>begins with "b", and ends with ".txt"</td>
</tr>
<tr>
<td>Data???</td>
<td>begins with the characters "Data" followed by exactly 3 more characters</td>
</tr>
<tr>
<td>[abc]*</td>
<td>begins with "a" or "b" or "c" followed by any other characters</td>
</tr>
</table>
</p>
</section>
<section>
<h2>Directories</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
~/Documents/some_folder/some_other_folder/some_file.tx
. = root
.. = up
~ = home directory
</code></pre>
</p>
</section>
<section>
<h2>$ cp</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ cp file1 file2
[me@linuxbox me]$ cp file... directory
</code></pre>
</p>
</section>
<section>
<h2>$ mv</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ mv filename1 filename2
[me@linuxbox me]$ mv file... directory
</code></pre>
</p>
</section>
<section>
<h2>$ rm</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ rm file...
[me@linuxbox me]$ rm -r directory...
Be careful with rm!
[me@linuxbox me]$ rm -rf /
</code></pre>
</p>
</section>
<section>
<h2>$ mkdir</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
[me@linuxbox me]$ mkdir directory...
</code></pre>
</p>
</section>
<section>
<h2>Quiz</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ cp *.txt text_files
$ mv my_dir ../*.bak my_new_dir
$ rm *~
$ ls **/*.jpg > jpg-dir.txt
$ unexisted-command 2> /dev/null
</code></pre>
</p>
</section>
<section>
<h2>Directories: Let's Move Around</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ pwd
$ cd <folder-name>
$ cd ..
$ cd ~
</code></pre>
</p>
</section>
<section>
<h2>Let's Make, View and Destroy Stuff</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ mkdir some/folder
$ mkdir -p some/folder/
$ touch test.txt
$ open test.txt
$ cat test.txt
$ mv test.txt test2.txt
$ rm test.txt
$ cp test.txt
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>$ alias</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ alias ll='ls -la'
$ alias rmi='rm -i'
$ alias cia='. /home/sydney/env/cia.sh'
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>$ history</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ history
$ !! # recall the latest command
$ !1003 # recall the latest command by its number
$ !cat # recall the latest command matching a starting string
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>$ find</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ find . -name test.js
$ find /etc -name '*.txt'
$ find . -name '*.xml'
$ find . -not -name '*.xml' -maxdepth
$ find . -type f
$ find . -mtime -1
$ find . -mmin -15
$ find . -size -1k
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>$ grep</h2>
<p>
<u>G</u>lobal <u>R</u>egular <u>E</u>xpression <u>P</u>rint
<br/>
g/re/p
<br/>
<br/>
for finding text inside files
<pre><code data-trim contenteditable style="padding:20px">
$ grep <string> <file or directory>
$ grep 'some text' file.js
$ grep something file.js
$ grep -r 'Dao[v1|v2]' src.js
$ grep -i
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>$ sed</h2>
<p>
<img class="no-border" src="http://www.catonmat.net/blog/wp-content/uploads/2007/07/post-icon-sed.jpg" />
</p>
</section>
</section>
<section>
<section>
<h2>$ awk</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
condition { actions }
$ awk 'END { print NR }' server.log
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>Working With Commands</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
# Display information about command type
# (executable, built-in shell, function, alias)
$ type cp
cp is /bin/cp
# Locate a command
$ which ls
/bin/ls
# Display reference page for shell builtin
$ help -m cd
...
# Display an on-line command reference
$ man ls
...
</code></pre>
</p>
</section>
</section>
<section>
<section>
<h2>Permissions</h2>
<p>
<pre><code data-trim contenteditable style="padding:20px">
$ ls -l
total 72
# Permissions Links Owner Group Size Modification File Name
drwxr-xr-x 2 root root 4096 Oct 5 09:31 bin
drwxr-xr-x 3 root root 4096 Oct 9 21:47 boot
drwxr-xr-x 1 root root 0 Jan 1 1970 dev
...
</code></pre>
</p>
<aside class="notes">
<pre>
set of file attributes you'll run into, though, is permissions
Every file and directory in the system has an owner,
belongs to a group
and has a set of permissions
</pre>
</aside>
</section>
<section>
<h2>Permissions: explanation</h2>
<p>
<div style="text-align:left;">
<b><u>d</u>rwxr-xr-x</b>
<br/>
d - type of file (<b>-</b> regular file, <b>d</b> directoty, <b>l</b> symbolic link, etc)
</div>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
<section>
<h2>Permissions: types</h2>
<p>
<div style="text-align:left;">
<b>d<u>rwxr-xr-x</u></b>
<br/>
<br/>
<ul>
<li>Read (r) - see the contents of a file
<li>Write (w) - modify its contents
<li>Execute (x) - you wish to run it (the file is a program)
<li>Anything (-)
</ul>
<br/>
<br/>
<pre><code data-trim contenteditable style="padding:20px">
:type : owner : group : restofworld:
:d : rwx : r-x : r-x
</code></pre>
</div>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
<section>
<h2>Who are you?</h2>
<p>
<div style="text-align:left;">
<pre><code data-trim contenteditable style="padding:20px">
$ whoami
joe
$ id -G -n
</code></pre>
</div>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
<section>
<h2>Permissions: to Octal notation</h2>
<p>
<img class="no-border" src="http://en.flossmanuals.net/command-line/permissions/_booki/command-line/static/CommandLineIntro-octal_notation-en.png" />
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
</section>
<section>
<section>
<h2>Exit status</h2>
<p>
<b>$?</b> = from 0 to 255
<br/>
<b>zero</b> = success
<br/>
<pre><code data-trim contenteditable style="padding:20px">
$ echo "this works fine"
this works fine
$ echo $?
0
$ hhhhhh
bash: hhhhhh: command not found
$ echo $?
127
</code></pre>
</p>
<aside class="notes">
<pre>
When you type commands
print an error message
</pre>
</aside>
</section>
<section>
<h2>Exit status: examples</h2>
<p>
<b>126</b> = permission denied
<br/>
</p>
<aside class="notes">
<pre>
</pre>
</aside>
</section>
</section>
<section>
<section>
<h2>Environment Variables and $PATH</h2>
<p>