41
41
<!-- Any section element inside of this container is displayed as a slide -->
42
42
< div class ="slides ">
43
43
< section >
44
- < h2 >
44
+ < h1 >
45
45
Basic Linux Commands
46
- </ h2 >
46
+ </ h1 >
47
47
</ section >
48
48
< section >
49
49
< h2 >
50
50
Introduction: What is Linux?
51
51
</ h2 >
52
52
< ul >
53
53
< li > An operating system</ li >
54
- < li > Developed at AT&T Bell Labs in the 1960’s </ li >
55
- < li > Command Line Interpreter</ li >
54
+ < li > Developed by Linus Torvalds in the 1990s </ li >
55
+ < li > Comes with a Command Line Interpreter (CLI) </ li >
56
56
< li > GUIs (Window systems) are now available</ li >
57
57
</ ul >
58
58
</ section >
69
69
</ section >
70
70
< section >
71
71
< h2 >
72
- What exactly is a “shell”?
72
+ What exactly is a CLI or “shell”?
73
73
</ h2 >
74
74
< ul >
75
75
< li > The shell interprets commands the user types and manages their execution</ li >
76
76
< li > The most popular shells are: tcsh, csh, korn, and bash</ li >
77
77
< li > For this tutorial, we are using bash</ li >
78
78
</ ul >
79
- < p >
80
- < h5 >
81
- Shell commands are CASE SENSITIVE!
82
- </ h5 >
83
- </ p >
84
79
</ section >
85
80
< section >
86
81
< h2 >
108
103
</ h2 >
109
104
< p > To change to a specific directory use cd command</ p >
110
105
< p >
111
- Syntax: < code > < font color ="green "> cd</ font > < font color ="yellow "> <filename></ font > </ code >
106
+ Syntax: < code > < font color ="green "> cd</ font > < font color ="orange "> <filename></ font > </ code >
112
107
</ p >
113
108
< ul >
114
109
< li > “~” is the location of your home directory</ li >
140
135
< section >
141
136
< h3 > Options can be combined:</ h3 >
142
137
< ul >
143
- < li > Command: < code > < font color ="green "> ls</ font > < font color ="yellow "> -ltr</ font > </ code > </ li >
138
+ < li > Command: < code > < font color ="green "> ls</ font > < font color ="orange "> -ltr</ font > </ code > </ li >
144
139
</ ul >
145
140
< p > List files by time in reverse order with long listing</ p >
146
141
</ section >
@@ -151,6 +146,47 @@ <h2>Wildcards</h2>
151
146
</ p >
152
147
< p > < code > < font color ="green "> *</ font > </ code > can be used as a wildcard in Unix/Linux</ p >
153
148
</ section >
149
+ < section >
150
+ < h1 > PERMISSIONS</ h1 >
151
+ </ section >
152
+ < section >
153
+ < h2 >
154
+ File permissions
155
+ </ h2 >
156
+ < p >
157
+ < ul >
158
+ < li > Each file in Unix/Linux has an associated permission level</ li >
159
+ < li > This allows the user to prevent others from reading/writing/executing their files or directories</ li >
160
+ < li > Use “ls -l filename” to find the permission level of that file</ li >
161
+ </ ul >
162
+ </ p >
163
+ </ section >
164
+ < section >
165
+ < h2 >
166
+ Permission levels
167
+ </ h2 >
168
+ < p >
169
+ < ul >
170
+ < li > “r” means “read only” permission</ li >
171
+ < li > “w” means “write” permission</ li >
172
+ < li > “x” means “execute” permission</ li >
173
+ </ ul >
174
+ </ p >
175
+ < p >
176
+ In case of directory, “x” grants permission to list directory contents
177
+ </ p >
178
+ </ section >
179
+ < section >
180
+ < h2 >
181
+ chmod
182
+ </ h2 >
183
+ < p >
184
+ If you own the file, you can change its permissions with “chmod”
185
+ </ p >
186
+ < p >
187
+ Syntax: < code > < font color ="green "> chmod</ font > < font color ="orange "> [user/group/others/all]+[permission] [file(s)]</ font > </ code >
188
+ </ p >
189
+ </ section >
154
190
< section >
155
191
< h2 >
156
192
mkdir
159
195
To create a new directory, use the mkdir command
160
196
</ p >
161
197
< p >
162
- Syntax: < code > < font color ="green "> mkdir</ font > < font color ="yellow "> <dirname></ font > </ code >
198
+ Syntax: < code > < font color ="green "> mkdir</ font > < font color ="orange "> <dirname></ font > </ code >
163
199
</ p >
164
200
</ section >
165
201
< section >
170
206
To remove an empty directory, use "rmdir".
171
207
</ p >
172
208
< p >
173
- Syntax: < code > < font color ="green "> rmdir</ font > < font color ="yellow "> <dirname></ font > </ code >
209
+ Syntax: < code > < font color ="green "> rmdir</ font > < font color ="orange "> <dirname></ font > </ code >
174
210
</ p >
175
211
</ section >
176
212
< section >
197
233
Dumps an entire file to standard output
198
234
</ p >
199
235
< p >
200
- Syntax: < code > < font color ="green "> cat</ font > < font color ="yellow "> <filename></ font > </ code >
236
+ Syntax: < code > < font color ="green "> cat</ font > < font color ="orange "> <filename></ font > </ code >
201
237
</ p >
202
238
</ section >
203
239
< section >
208
244
“less” displays a file, allowing forward/backward movement within it
209
245
</ p >
210
246
< p >
211
- Syntax: < code > < font color ="green "> less</ font > < font color ="yellow "> <filename></ font > </ code >
247
+ Syntax: < code > < font color ="green "> less</ font > < font color ="orange "> <filename></ font > </ code >
212
248
</ p >
213
249
< p >
214
250
< ul >
227
263
“head” displays the top part of a file
228
264
</ p >
229
265
< p >
230
- Syntax: < code > < font color ="green "> head</ font > < font color ="yellow "> <filename></ font > </ code >
266
+ Syntax: < code > < font color ="green "> head</ font > < font color ="orange "> <filename></ font > </ code >
231
267
</ p >
232
268
< ul >
233
269
< li > return scrolls forward one line, space one page</ li >
244
280
Same as head, but shows the last lines
245
281
</ p >
246
282
< p >
247
- Syntax: < code > < font color ="green "> tail</ font > < font color ="yellow "> <filename></ font > </ code >
283
+ Syntax: < code > < font color ="green "> tail</ font > < font color ="orange "> <filename></ font > </ code >
248
284
</ p >
249
285
</ section >
250
286
< section >
272
308
Copies a file from source to destination
273
309
</ p >
274
310
< p >
275
- Syntax: < code > < font color ="green "> cp</ font > < font color ="yellow "> <source> <destination></ font > </ code >
311
+ Syntax: < code > < font color ="green "> cp</ font > < font color ="orange "> <source> <destination></ font > </ code >
276
312
</ p >
277
313
</ section >
278
314
< section >
283
319
To move a file to a different location use “mv”
284
320
</ p >
285
321
< p >
286
- Syntax: < code > < font color ="green "> command</ font > < font color ="yellow "> <source> <destination></ font > </ code >
322
+ Syntax: < code > < font color ="green "> command</ font > < font color ="orange "> <source> <destination></ font > </ code >
287
323
</ p >
288
324
< p >
289
325
< ul >
@@ -299,57 +335,17 @@ <h2>
299
335
To remove a file use “rm”
300
336
</ p >
301
337
< p >
302
- Syntax: < code > < font color ="green "> rm</ font > < font color ="yellow "> <filename></ font > </ code >
338
+ Syntax: < code > < font color ="green "> rm</ font > < font color ="orange "> <filename></ font > </ code >
303
339
</ p >
304
340
< ul >
305
- < li > To remove a file recursively, type: < code > < font color ="green "> rm</ font > < font color ="yellow "> -r</ font > </ code > </ li >
341
+ < li > To remove a file recursively, type: < code > < font color ="green "> rm</ font > < font color ="orange "> -r</ font > </ code > </ li >
306
342
< li > Used to remove all files and directories </ li >
307
343
</ ul >
308
344
< p >
309
345
< h4 > Be very careful, deletions are permanent in Unix/Linux</ h4 >
310
346
</ p >
311
347
</ section >
312
- < section >
313
- < h1 > PERMISSIONS</ h1 >
314
- </ section >
315
- < section >
316
- < h2 >
317
- File permissions
318
- </ h2 >
319
- < p >
320
- < ul >
321
- < li > Each file in Unix/Linux has an associated permission level</ li >
322
- < li > This allows the user to prevent others from reading/writing/executing their files or directories</ li >
323
- < li > Use “ls -l filename” to find the permission level of that file</ li >
324
- </ ul >
325
- </ p >
326
- </ section >
327
- < section >
328
- < h2 >
329
- Permission levels
330
- </ h2 >
331
- < p >
332
- < ul >
333
- < li > “r” means “read only” permission</ li >
334
- < li > “w” means “write” permission</ li >
335
- < li > “x” means “execute” permission</ li >
336
- </ ul >
337
- </ p >
338
- < p >
339
- In case of directory, “x” grants permission to list directory contents
340
- </ p >
341
- </ section >
342
- < section >
343
- < h2 >
344
- chmod
345
- </ h2 >
346
- < p >
347
- If you own the file, you can change its permissions with “chmod”
348
- </ p >
349
- < p >
350
- Syntax: < code > < font color ="green "> chmod</ font > < font color ="yellow "> [user/group/others/all]+[permission] [file(s)]</ font > </ code >
351
- </ p >
352
- </ section >
348
+
353
349
< section >
354
350
< h2 >
355
351
wc
358
354
To count the characters, words, and lines in a file use “wc”
359
355
</ p >
360
356
< p >
361
- Syntax: < code > < font color ="green "> wc</ font > < font color ="yellow "> <filename></ font > </ code >
357
+ Syntax: < code > < font color ="green "> wc</ font > < font color ="orange "> <filename></ font > </ code >
362
358
</ p >
363
359
< p >
364
360
The outputs are lines, words and characters.
374
370
< li > < a href ="https://en.wikipedia.org/wiki/Linux "> Linux on Wikipedia</ a > </ li >
375
371
</ ul >
376
372
</ section >
377
- < section >
378
- < h1 > Thank You</ h1 >
379
- </ section >
380
373
381
374
382
375
< section >
0 commit comments