15
15
16
16
< link rel ="stylesheet " href ="css/reveal.css ">
17
17
< link rel ="stylesheet " href ="css/theme/black.css " id ="theme ">
18
+ < link rel ="stylesheet " href ="css/basiclinux.css ">
18
19
19
20
<!-- Code syntax highlighting -->
20
21
< link rel ="stylesheet " href ="lib/css/zenburn.css ">
43
44
< h2 >
44
45
Basic Linux Commands
45
46
</ h2 >
46
- < p > < small > Created by: Aashish Satyajith</ small > </ p >
47
47
</ section >
48
48
< section >
49
49
< h2 >
50
- Introduction: What is Unix ?
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 >
54
+ < li > Developed at AT& T Bell Labs in the 1960’s</ li >
55
55
< li > Command Line Interpreter</ li >
56
56
< li > GUIs (Window systems) are now available</ li >
57
57
</ ul >
58
58
</ section >
59
- < section >
59
+ < section id =" aash_code " >
60
60
< h2 >
61
- Introduction: Unix vs. Linux
62
- </ h2 >
63
- < ul >
64
- < li > Unix was the predecessor of Linux</ li >
65
- < li > Linux is a variant of Unix</ li >
66
- < li > So is Mac OS X, so much of this tutorial applies to Macs as well</ li >
67
- < li > Linux is open source</ li > </ ul >
68
- </ section >
69
- < section >
70
- < h2 >
71
- Introduction: Why Unix/Linux?
61
+ Introduction: Why Unix/Linux?
72
62
</ h2 >
73
63
< ul >
74
64
< li > Linux is free</ li >
83
73
</ h2 >
84
74
< ul >
85
75
< li > The shell interprets commands the user types and manages their execution</ li >
86
- < li > The shell communicates with the internal part of the operating system called the kernel</ li >
87
76
< li > The most popular shells are: tcsh, csh, korn, and bash</ li >
88
77
< li > For this tutorial, we are using bash</ li >
89
78
</ ul >
97
86
< h2 >
98
87
Help!
99
88
</ h2 >
100
- Whenever you need help with a command type “man” and the command name </ section >
89
+ Whenever you need help with a command type < code > < font color ="green "> man</ font > </ code > followed by the command name
90
+ </ section >
101
91
< section >
102
92
< h1 > FILE SYSTEM COMMANDS</ h1 >
103
93
</ section >
104
94
< section >
105
95
< h2 >
106
- Command: pwd
96
+ pwd
107
97
</ h2 >
108
- To find your current path use “pwd”
98
+ < p >
99
+ To find your current path use “pwd”
100
+ </ p >
101
+ < p >
102
+ Syntax: < code > < font color ="green "> pwd</ font > </ code >
103
+ </ p >
109
104
</ section >
110
105
< section >
111
106
< h2 >
112
- Command: cd filename
107
+ cd
113
108
</ h2 >
114
- < p > To change to a specific directory use “cd”</ p >
109
+ < p > To change to a specific directory use cd command</ p >
110
+ < p >
111
+ Syntax: < code > < font color ="green "> cd</ font > < font color ="yellow "> <filename></ font > </ code >
112
+ </ p >
115
113
< ul >
116
114
< li > “~” is the location of your home directory</ li >
117
115
< li > “..” is the location of the directory below current one</ li >
118
116
</ ul >
119
117
</ section >
120
118
< section >
121
119
< h2 >
122
- Command: ls
120
+ ls
123
121
</ h2 >
124
122
To list the files in the current directory use “ls”
123
+ < p >
124
+ Syntax: < code > < font color ="green "> ls</ font > </ code >
125
+ </ p >
125
126
</ section >
126
127
< section >
127
128
< h3 >
139
140
< section >
140
141
< h3 > Options can be combined:</ h3 >
141
142
< ul >
142
- < li > Command: ls -ltr</ li >
143
+ < li > Command: < code > < font color =" green " > ls </ font > < font color =" yellow " > -ltr</ font > </ code > </ li >
143
144
</ ul >
144
145
< p > List files by time in reverse order with long listing</ p >
145
146
</ section >
@@ -149,19 +150,25 @@ <h2>General Syntax: *</h2>
149
150
</ section >
150
151
< section >
151
152
< h2 >
152
- Command: mkdir
153
+ mkdir
153
154
</ h2 >
154
155
< p >
155
- To create a new directory use “ mkdir”
156
+ To create a new directory use mkdir
156
157
</ p >
158
+ < p >
159
+ Syntax: < code > < font color ="green "> mkdir</ font > < font color ="yellow "> <dirname></ font > </ code >
160
+ </ p >
157
161
</ section >
158
162
< section >
159
163
< h2 >
160
- Command: rmdir
164
+ rmdir
161
165
</ h2 >
162
166
< p >
163
167
To remove and empty directory use “rmdir”
164
168
</ p >
169
+ < p >
170
+ Syntax: < code > < font color ="green "> rmdir</ font > < font color ="yellow "> <dirname></ font > </ code >
171
+ </ p >
165
172
</ section >
166
173
< section >
167
174
< h1 >
@@ -181,19 +188,25 @@ <h2>
181
188
</ section >
182
189
< section >
183
190
< h2 >
184
- Command: cat
191
+ cat
185
192
</ h2 >
186
193
< p >
187
194
Dumps an entire file to standard output
188
195
</ p >
196
+ < p >
197
+ Syntax: < code > < font color ="green "> cat</ font > < font color ="yellow "> <filename></ font > </ code >
198
+ </ p >
189
199
</ section >
190
200
< section >
191
201
< h2 >
192
- Command: less
202
+ less
193
203
</ h2 >
194
204
< p >
195
205
“less” displays a file, allowing forward/backward movement within it
196
206
</ p >
207
+ < p >
208
+ Syntax: < code > < font color ="green "> less</ font > < font color ="yellow "> <filename></ font > </ code >
209
+ </ p >
197
210
< p >
198
211
< ul >
199
212
< li > return scrolls forward one line, space one page</ li >
@@ -205,11 +218,14 @@ <h2>
205
218
</ section >
206
219
< section >
207
220
< h2 >
208
- Command: head
221
+ head
209
222
</ h2 >
210
223
< p >
211
224
“head” displays the top part of a file
212
225
</ p >
226
+ < p >
227
+ Syntax: < code > < font color ="green "> head</ font > < font color ="yellow "> <filename></ font > </ code >
228
+ </ p >
213
229
< ul >
214
230
< li > return scrolls forward one line, space one page</ li >
215
231
< li > y scrolls back one line, b one page</ li >
@@ -219,11 +235,14 @@ <h2>
219
235
</ section >
220
236
< section >
221
237
< h2 >
222
- Command: tail
238
+ tail
223
239
</ h2 >
224
240
< p >
225
241
Same as head, but shows the last lines
226
242
</ p >
243
+ < p >
244
+ Syntax: < code > < font color ="green "> tail</ font > < font color ="yellow "> <filename></ font > </ code >
245
+ </ p >
227
246
</ section >
228
247
< section >
229
248
< h2 >
@@ -239,19 +258,25 @@ <h2>
239
258
</ section >
240
259
< section >
241
260
< h2 >
242
- Command: cp source destination
261
+ cp
243
262
</ h2 >
244
263
< p >
245
264
Copies a file from source to destination
246
265
</ p >
266
+ < p >
267
+ Syntax: < code > < font color ="green "> cp</ font > < font color ="yellow "> <source> <destination></ font > </ code >
268
+ </ p >
247
269
</ section >
248
270
< section >
249
271
< h2 >
250
- Command: mv source destination
272
+ mv
251
273
</ h2 >
252
274
< p >
253
275
To move a file to a different location use “mv”
254
276
</ p >
277
+ < p >
278
+ Syntax: < code > < font color ="green "> command</ font > < font color ="yellow "> <source> <destination></ font > </ code >
279
+ </ p >
255
280
< p >
256
281
< ul >
257
282
< li > mv can also be used to rename a file</ li >
@@ -260,11 +285,14 @@ <h2>
260
285
</ section >
261
286
< section >
262
287
< h2 >
263
- Command: rm filename
288
+ rm
264
289
</ h2 >
265
290
< p >
266
291
To remove a file use “rm”
267
292
</ p >
293
+ < p >
294
+ Syntax: < code > < font color ="green "> command</ font > < font color ="yellow "> <filename></ font > </ code >
295
+ </ p >
268
296
< ul >
269
297
< li > To remove a file “recursively”: rm –r</ li >
270
298
< li > Used to remove all files and directories </ li >
@@ -305,49 +333,25 @@ <h2>
305
333
</ section >
306
334
< section >
307
335
< h2 >
308
- Command: chmod
336
+ chmod
309
337
</ h2 >
310
338
< p >
311
339
If you own the file, you can change its permissions with “chmod”
312
340
</ p >
313
- < p >
314
- Syntax: chmod [user/group/others/all]+[permission] [file(s)]
315
- </ p >
316
- </ section >
317
- < section >
318
- < h1 > PROCESS COMMANDS</ h1 >
319
- </ section >
320
- < section >
321
- < h2 >
322
- Command: ps
323
- </ h2 >
324
- < p >
325
- To view the processes that you’re running
326
- </ p >
327
- </ section >
328
- < section >
329
- < h2 >
330
- Command: top
331
- </ h2 >
332
- < p >
333
- To view the CPU usage of all processes
334
- </ p >
335
- </ section >
336
- < section >
337
- < h2 >
338
- Command: kill
339
- </ h2 >
340
- < p >
341
- To terminate a process use “kill”
342
- </ p >
341
+ < p >
342
+ Syntax: < code > < font color ="green "> chmod</ font > < font color ="yellow "> <[user/group/others/all]+[permission] [file(s)]></ font > </ code >
343
+ </ p >
343
344
</ section >
344
345
< section >
345
346
< h2 >
346
- Command: wc
347
+ wc
347
348
</ h2 >
348
349
< p >
349
350
To count the characters, words, and lines in a file use “wc”
350
351
</ p >
352
+ < p >
353
+ Syntax: < code > < font color ="green "> command</ font > < font color ="yellow "> <filename></ font > </ code >
354
+ </ p >
351
355
< p >
352
356
The first column in the output is lines, the second is words, and the last is characters
353
357
</ p >
0 commit comments