-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
912 lines (896 loc) · 50.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Linux Commands Cheat Sheet</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="linux-teacher.png" type="image/png">
</head>
<body>
<div class="container">
<header>
<h1>Linux Commands Cheat Sheet 🐧📚📚</h1>
<img src="Label.jpeg" alt="Linux Commands" class="header-image">
</header>
<section class="intro">
<h2>Why this repo❓</h2>
<p>A lot of people are learning Linux for development reasons. They sometimes forget the commands. To help
them <strong>memorize</strong> the commands, I made this repo. This is my personal repo, where I keep
all the commands I use. I hope this repo helps you too. I provided a short description with it, also
usage and an example. <strong>Remember</strong>, these are bash commands.</p>
</section>
<section class="table-of-contents">
<h2>Table of Contents</h2>
<ul>
<li><a href="#most-used-commands">Most Used Commands</a></li>
<li><a href="#not-that-much-used-commands">Not that much used Commands</a></li>
<li><a href="#all-in-one-chart">All in one chart</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#author">Author</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</section>
<section class="search-bar">
<label for="searchInput"></label><input type="text" id="searchInput" onkeyup="searchCommands()"
placeholder="Search for commands...">
</section>
<section id="most-used-commands" class="commands">
<h2>Most Used Commands</h2>
<div class="command">
<h3>01. <code>ls</code></h3>
<p>This command is used to list the files and directories in the current directory.</p>
<p>Usage:</p>
<pre><code>ls</code></pre>
<p>Output:</p>
<pre><code>Desktop Documents Downloads Music Pictures Videos</code></pre>
</div>
<div class="command">
<h3>02. <code>cd</code></h3>
<p>This command is used to change the directory. You can use <code>cd</code> to change to the home
directory. Or, you can use <code>cd ..</code> to move to the parent directory. You can also use
<code>cd -</code> to move to the previous directory. You can also specify the path after the
<code>cd</code> command to move to that directory. Or,use <code>cd ../..</code> to move two
directories down.You can use <code>cd ~</code> to move to the home directory. You can also use
<code>cd /</code>to move to the root directory. You can also use <code></code>cd <code></code> then
the directory path to move to that directory.
</p>
<p>Usage:</p>
<pre><code>cd</code></pre>
<p>Output:</p>
<pre><code>/home/username</code></pre>
</div>
<div class="command">
<h3>03. <code>pwd</code></h3>
<p>This command is used to print the current working directory. You can use <code>pwd</code> to print
the current working directory.
</p>
<p>Usage:</p>
<pre><code>pwd</code></pre>
<p>Output:</p>
<pre><code>/home/username</code></pre>
</div>
<div class="command">
<h3>04. <code>touch</code></h3>
<p>This command is used to create a new file. You can use <code>touch</code> then the file name to
create a new file.</p>
<p>Usage:</p>
<pre><code>touch file.txt</code></pre>
<p>Output:</p>
<pre><code>file.txt</code></pre>
</div>
<div class="command">
<h3>05. <code>mkdir</code></h3>
<p>This command is used to create a new directory. You can use <code>mkdir</code> then the directory
name to create a new directory.</p>
<p>Usage:</p>
<pre><code>mkdir directory</code></pre>
<p>Output:</p>
<pre><code>directory</code></pre>
</div>
<div class="command">
<h3>06. <code>rm</code></h3>
<p>This command is used to remove files or directories. You can use <code>rm</code> then the file name
to remove a file. You can also use <code>rm -r</code> then the directory name to remove a directory.
Or, <code>rm -rf</code> then the directory name to remove a directory forcefully. You can also use
<code>rm -i</code> then the file name to remove a file interactively. You can append
<code>sudo</code> before the <code>rm</code> command to remove a file or directory that requires
root permission. Remember, the <code>rm</code> command is irreversible.
</p>
<p>Usage:</p>
<pre><code>rm file.txt</code></pre>
<p>Output:</p>
<p>If you use the command <code>ls</code> then you will see the file is removed.</p>
</div>
<div class="command">
<h3>07. <code>cp</code></h3>
<p>This command is used to copy files or directories. You can use <code>cp</code> then the source file name
and the destination file name to copy a file. You can also use <code>cp -r</code> then the source
directory name and the destination directory name to copy a directory. You can also use
<code>cp -i</code> then the source file name and the destination file name to copy a file interactively.
You can append <code>sudo</code> before the <code>cp</code> command to copy a file or directory that
requires root permission.</p>
<p>Usage:</p>
<pre><code>cp file.txt file2.txt</code></pre>
<p>Output:</p>
<pre><code>file2.txt</code></pre>
<p>Usage Number 2:</p>
<pre><code>cp -r directory directory2</code></pre>
<p>Output:</p>
<pre><code>directory2</code></pre>
<p>You will see the files are copied.</p>
</div>
<div class="command">
<h3>08. <code>mv</code></h3>
<p>This command is used to move files or directories. You can use <code>mv</code> then the source file
name and the destination file name to move a file. You can also use <code>mv -i</code> then the
source file name and the destination file name to move a file interactively. You can append
<code>sudo</code> before the <code>mv</code> command to move a file or directory that requires root
permission.
</p>
<p>Usage:</p>
<pre><code>mv file.txt directory</code></pre>
<p>Output:</p>
<pre><code>directory/file.txt</code></pre>
</div>
<div class="command">
<h3>09. <code>cat</code></h3>
<p>This command is used to display the contents of a file. You can use <code>cat</code> then the file
name to display the contents of a file.</p>
<p>Usage:</p>
<pre><code>cat file.txt</code></pre>
<p>Output:</p>
<pre><code>Hello World</code></pre>
<p>If <code>file.txt</code> contains <code>Hello World</code>, then the output will be
<code>Hello World</code>. If there is nothing, then the output will be empty.
</p>
</div>
<div class="command">
<h3>10. <code>more</code></h3>
<p>This command is used to display the contents of a file one page at a time. You can use
<code>more</code> then the file name to display the contents of a file one page at a time. You can
use the <code>space</code> key to move to the next page. You can use the <code>Enter</code> key to
move to the next line. You can use the <code>q</code> key to quit the display. You can use the
<code>b</code> key to move to the previous page.
</p>
<p>Usage:</p>
<pre><code>more file.txt</code></pre>
<p>Output:</p>
<pre><code>Hello World</code></pre>
</div>
<div class="command">
<h3>11. <code>less</code></h3>
<p>This command is used to display the contents of a file one page at a time. You can use
<code>less</code> then the file name to display the contents of a file one page at a time. You can
use the <code>space</code> key to move to the next page. You can use the <code>enter</code> key to
move to the next line. You can use the <code>q</code> key to quit the display. You can use the
<code>b</code> key to move to the previous page. You can use the <code>/</code> key to search for a
pattern in the file. You can use the <code>n</code> key to move to the next occurrence of the
pattern. You can use the <code>N</code> key to move to the previous occurrence of the pattern. This
command is similar to the <code>more</code> command. But,it is mainly used if the file is so big
that no text editor can handle it.
</p>
<p>Usage:</p>
<pre><code>less file.txt</code></pre>
<p>Output:</p>
<pre><code>Hello World</code></pre>
<p>If <code>file.txt</code> contains <code>Hello World</code>,then the output will be
<code>Hello World</code>. If there is nothing,then the output will be empty.
</p>
</div>
<div class="command">
<h3>12. <code>head</code></h3>
<p>This command is used to display the first few lines of a file. You can use <code>head</code> then the
file name to display the first few lines of a file. You can also use <code>head -n</code> then the
number of lines and the file name to display the first few lines of a file. You can also use
<code>head -c</code> then the number of bytes and the file name to display the first few bytes of a
file.
</p>
<p>Usage:</p>
<pre><code>head file.txt</code></pre>
<p>Output:</p>
<pre><code>This is the headline</code></pre>
<p>If <code>file.txt</code> contains <code>This is the headline</code> as the headline,then the output
will be <code>This is the headline</code>. If there is nothing,then the output will be empty.</p>
</div>
<div class="command">
<h3>13. <code>tail</code></h3>
<p>This command is used to display the last few lines of a file. You can use <code>tail</code> then the
file name to display the last few lines of a file. You can also use <code>tail -n</code> then the
number of lines and the file name to display the last few lines of a file. You can also use
<code>tail -c</code> then the number of bytes and the file name to display the last few bytes of a
file. You can also use <code>tail -f</code> then the file name to display the last few lines of a
file and keep the file open for new lines.
</p>
<p>Usage:</p>
<pre><code>tail file.txt</code></pre>
<p>Output:</p>
<pre><code>This is the last line</code></pre>
<p>If <code>file.txt</code> contains <code>This is the last line</code> at the end,then the output will
be <code>This is the last line</code>. If there is nothing,then the output will be empty.</p>
</div>
<div class="command">
<h3>14. <code>grep</code></h3>
<p>This command is used to search for a pattern in a file. You can use <code>grep</code> then the
pattern and the file name to search for a pattern in a file. You can also use <code>grep -i</code>
then the pattern and the file name to search for a pattern in a file case-insensitively. You can
also use <code>grep -v</code> then the pattern and the file name to search for a pattern in a file
inversely. You can also use <code>grep -c</code> then the pattern and the file name to search for a
pattern in a file and display the count of the pattern. You can also use <code>grep -n</code> then
the pattern and the file name to search for a pattern in a file and display the line numbers of the
pattern. You can also use <code>grep -l</code> then the pattern and the file name to search for a
pattern in a file and display the file names containing the pattern. You can also use
<code>grep -r</code> then the pattern and the directory name to search for a pattern in a directory
recursively.
</p>
<p>Usage:</p>
<pre><code>grep "pattern" file.txt</code></pre>
<p>Output:</p>
<pre><code>pattern</code></pre>
<p>If <code>file.txt</code> contains <code>pattern</code> 1 or more times, then the output will be
<code>pattern</code>. If there is nothing, then the output will be empty.
</p>
</div>
<div class="command">
<h3>15. <code>find</code></h3>
<p>This command is used to find files or directories. You can use <code>find</code> then the directory
name to find files or directories in a directory. You can also use <code>find -name</code> then the
file name to find files or directories with the specified name. You can also use
<code>find -iname</code> then the file name to find files or directories with the specified name
case-insensitively. You can also use <code>find -type</code> then the file type to find files or
directories with the specified type. You can also use <code>find -empty</code> to find empty files
or directories. You can also use <code>find -size</code> then the file size to find files or
directories with the specified size. You can also use <code>find -exec</code> then the command to
execute the command on the found files or directories.
</p>
<p>Usage:</p>
<pre><code>find directory</code></pre>
<p>Output:</p>
<pre><code>directory</code></pre>
<p>If the directory exists, then the output will be the directory name. If there is nothing, then the
output will be empty.</p>
</div>
<div class="command">
<h3>16. <code>whereis</code></h3>
<p>This command is used to find the binary, source, and manual page files for a command. You can use
<code>whereis</code> then the command name to find the binary, source, and manual page files for a
command.
</p>
<p>Usage:</p>
<pre><code>whereis ls</code></pre>
<p>Output:</p>
<pre><code>ls: /bin/ls</code></pre>
</div>
<div class="command">
<h3>17. <code>which</code></h3>
<p>This command is used to find the location of a command. You can use <code>which</code> then the
command name to find the location of a command.</p>
<p>Usage:</p>
<pre><code>which ls</code></pre>
<p>Output:</p>
<pre><code>/bin/ls</code></pre>
</div>
<div class="command">
<h3>18. <code>man</code></h3>
<p>This command is used to display the manual page of a command. You can use <code>man</code> then the
command name to display the manual page of a command. You can use the <code>space</code> key to move
to the next page. You can use the <code>enter</code> key to move to the next line. You can use the
<code>q</code> key to quit the display. You can use the <code>/</code> key to search for a pattern
in the manual page. You can use the <code>n</code> key to move to the next occurrence of the
pattern. You can use the <code>N</code> key to move to the previous occurrence of the pattern.
</p>
<p>Usage:</p>
<pre><code>man brew</code></pre>
<p>Output:</p>
<pre><code>
BREW(1) Homebrew Manual BREW(1)
NAME
brew - The Missing Package Manager for macOS
SYNOPSIS
brew command [options] [formula]
brew help [command]
brew home
brew --version
brew --prefix
brew --cache
brew --cellar
brew --repository
brew update
brew list [--full-name]
brew search [text|/text/]
brew install formula
brew uninstall formula
brew info [formula]
brew deps formula
brew uses formula
brew outdated
brew upgrade [formula]
brew pin formula
brew unpin formula
brew list [formula]
brew cleanup
brew doctor
brew missing
brew link formula
brew unlink formula
brew switch formula
brew list --versions formula
brew cat formula
brew edit formula
brew create [URL [--no-fetch]]
brew home formula
brew options formula
brew install formula
brew fetch [formula]
brew update
brew upgrade
brew uninstall formula
brew pin formula
brew unpin formula
brew tap user/repo
brew tap --repair
brew tap --list
brew tap --prune
brew tap --search
brew tap --list-official
brew tap --list-pinned
brew tap --list-unpinned
brew tap --list-versions
brew tap --list-pinned-versions
brew tap --list-unpinned-versions
brew tap --list-pinned-official
brew tap --list-unpinned-official
brew tap --list-pinned-user
brew tap --list-unpinned-user
brew tap --list-pinned-user-versions
brew tap --list-unpinned-user-versions
brew tap --list-pinned-user-official
</code></pre>
<p>And, it will show you a lot more. I am not going to show you the whole manual page. This manual page
is for homebrew. If you want to see the manual page of a command, then use <code>man</code> then the
command name.</p>
</div>
</section>
<section id="not-that-much-used-commands" class="commands">
<h2>Not that much used Commands</h2>
<div class="command">
<h3>01. <code>chmod</code></h3>
<p>This command is used to change the permissions of a file or directory. You can use <code>chmod</code>
then the permissions and the file name to change the permissions of a file or directory. You can
also use <code>chmod -R</code> then the permissions and the directory name to change the permissions
of a directory recursively. You can also use <code>chmod u+x</code> then the file name to add
execute permission to the owner of the file. You can also use <code>chmod g+x</code> then the file
name to add execute permission to the group of the file. You can also use <code>chmod o+x</code>
then the file name to add execute permission to others. You can also use <code>chmod a+x</code> then
the file name to add execute permission to all. You can also use <code>chmod u-x</code> then the
file name to remove execute permission from the owner of the file. You can also use
<code>chmod g-x</code> then the file name to remove execute permission from the group of the file.
You can also use <code>chmod o-x</code> then the file name to remove execute permission from others.
You can also use <code>chmod a-x</code> then the file name to remove execute permission from all.
You can also use <code>chmod u=rwx</code> then the file name to set read, write, and execute
permissions for the owner of the file. You can also use <code>chmod g=rwx</code> then the file name
to set read, write, and execute permissions for the group of the file. You can also use
<code>chmod o=rwx</code> then the file name to set read, write, and execute permissions for others.
You can also use <code>chmod a=rwx</code> then the file name to set read, write, and execute
permissions for all. You can also use <code>chmod 777</code> then the file name to set read, write,
and execute permissions for all. You can also use <code>chmod 755</code> then the file name to set
read, write, and execute permissions for the owner and read and execute permissions for the group
and others. You can also use <code>chmod 644</code> then the file name to set read and write
permissions for the owner and read permissions for the group and others. You can also use
<code>chmod 600</code> then the file name to set read and write permissions for the owner and no
permissions for the group and others. You can also use <code>chmod 666</code> then the file name to
set read and write permissions for all. You can also use <code> chmod 444</code> then the file name
to set read permissions for all. You can also use <code>chmod 400</code> then the file name to set
read permissions for the owner and no permissions for the group and others. You can also use
<code>chmod 200</code> then the file name to set write permissions for the owner and no permissions
for the group and others. You can also use <code>chmod 100</code> then the file name to set execute
permissions for the owner and no permissions for the group and others. You can also use
<code>chmod 000</code> then the file name to set no permissions for all.
</p>
<p>Usage:</p>
<pre><code>chmod 777 file.txt</code></pre>
<p>Output:</p>
<pre><code>file.txt</code></pre>
<p>If you use the command <code>ls -l</code> then you will see the permissions are changed.</p>
</div>
<div class="command">
<h3>02. <code>chown</code></h3>
<p>This command is used to change the owner of a file or directory. You can use <code>chown</code> then
the owner name and the file name to change the owner of a file or directory. You can also use
<code>chown -R</code> then the owner name and the directory name to change the owner of a directory
recursively. You can also use <code>chown owner:group</code> then the owner name, group name, and
the file name to change the owner and group of a file or directory. You can also use
<code>chown -R owner:group</code> then the owner name, group name, and the directory name to change
the owner and group of a directory recursively.
</p>
<p>Usage:</p>
<pre><code>chown owner file.txt</code></pre>
<p>Output:</p>
<pre><code>file.txt</code></pre>
<p>If you use the command <code>ls -l</code> then you will see the owner is changed.</p>
</div>
<div class="command">
<h3>03. <code>whoami</code></h3>
<p>This command is used to print the current user. You can use <code>whoami</code> to print the current
user.
</p>
<p>Usage:</p>
<pre><code>whoami</code></pre>
<p>Output:</p>
<pre><code>username</code></pre>
</div>
<div class="command">
<h3>04. <code>date</code></h3>
<p>This command is used to print the current date and time. You can use <code>date</code> to print the
current date and time. The format will be <code>Day, Date, Month, Year, Time, Timezone</code>.</p>
<p>Usage:</p>
<pre><code>date</code></pre>
<p>Output:</p>
<pre><code>Sun 10 Oct 2021 10:10:10 PM IST</code></pre>
</div>
<div class="command">
<h3>05. <code>cal</code></h3>
<p>This command is used to print the calendar of the current month. You can use <code>cal</code> to
print the calendar of the current month.</p>
<p>Usage:</p>
<pre><code>cal</code></pre>
<p>Output:</p>
<pre><code>
October 2021
Su Mo Tu We Th Fr Sa
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
</code></pre>
</div>
<div class="command">
<h3>06. <code>clear</code></h3>
<p>This command is used to clear the terminal. You can use <code>clear</code> to clear the terminal. You
can do ctrl+l to clear the terminal too.</p>
<p>Usage:</p>
<pre><code>clear</code></pre>
<p>Output:</p>
<pre><code></code></pre>
<p>You will see the terminal is cleared.</p>
</div>
<div class="command">
<h3>07. <code>echo</code></h3>
<p>This command is used to print a message. You can use <code>echo</code> then the message to print a
message. You can also use ```echo -e``` then the message to print a message with escape characters
interpreted. You can also use ```echo -n``` then the message to print a message without a newline.
</p>
<p>Usage:</p>
<pre><code>echo "Hello World"</code></pre>
<p>Output:</p>
<pre><code>Hello World</code></pre>
</div>
<div class="command">
<h3>08. <code>uname</code></h3>
<p>This command is used to print the system information. You can use <code>uname</code> to print the
system information. You can also use <code>uname -a</code> to print all the system information. You
can also use <code>uname -s</code> to print the system name. You can also use <code>uname -n</code>
to print the network node hostname. You can also use <code>uname -r</code> to print the kernel
release. You can also use <code>uname -v</code> to print the kernel version. You can also use
<code>uname -m</code> to print the machine hardware name. You can also use <code>uname -p</code> to
print the processor type. You can also use <code>uname -i</code> to print the hardware platform. You
can also use <code>uname -o</code> to print the operating system.
</p>
<p>Usage:</p>
<pre><code>uname</code></pre>
<p>Output:</p>
<pre><code>Linux</code></pre>
</div>
<div class="command">
<h3>09. <code>uptime</code></h3>
<p>This command is used to print the uptime of the system. You can use <code>uptime</code> to print the
uptime of the system.</p>
<p>Usage:</p>
<pre><code>uptime</code></pre>
<p>Output:</p>
<pre><code>10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10</code></pre>
<p>If the system is up for 10 days,10 hours,10 minutes, then the output will be
<code>10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10</code>. If there is
nothing, then the output will be empty.
</p>
</div>
<div class="command">
<h3>10. <code>w</code></h3>
<p>This command is used to print the users who are currently logged in and what they are doing. You can
use <code>w</code> to print the users who are currently logged in and what they are doing.</p>
<p>Usage:</p>
<pre><code>w</code></pre>
<p>Output:</p>
<pre><code>
10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
username tty1 :0 10:10 10:10 10:10 10:10 -bash
</code></pre>
<p>If the user is logged in and is doing something, then the output will be the user's information. If
there is nothing, then the output will be empty.</p>
</div>
<div class="command">
<h3>11. <code>who</code></h3>
<p>This command is used to print the users who are currently logged in. You can use <code>who</code> to
print the users who are currently logged in.</p>
<p>Usage:</p>
<pre><code>who</code></pre>
<p>Output:</p>
<pre><code>username tty1 2021-10-10 10:10 (:0)</code></pre>
<p>If the user is logged in, then the output will be the user's information. If there is nothing, then
the output will be empty.</p>
</div>
<div class="command">
<h3>12. <code>ps</code></h3>
<p>This command is used to print the currently running processes. You can use <code>ps</code> to print
the currently running processes. You can also use <code>ps -e</code> to print all the processes. You
can also use <code>ps -f</code> to print the full-format listing. You can also use <code>ps-l</code>
to print the long-format listing. You can also use <code>ps -u</code> then the username to print the
processes of the user. You can also use <code>ps -aux</code> to print all the processes in
full-format listing.</p>
<p>Usage:</p>
<pre><code>ps</code></pre>
<p>Output:</p>
<pre><code>
PID TTY TIME CMD
123 tty1 00:00:00 bash
</code></pre>
<p>If the process is running, then the output will be the process information. It will also show system
running processes.</p>
</div>
<div class="command">
<h3>13. <code>kill</code></h3>
<p>This command is used to kill a process. You can use <code>kill</code> then the process ID to kill a
process. You can also use <code>kill -9</code> then the process ID to kill a process forcefully. You
can also use <code>kill -l</code> to list all the signals.</p>
<p>Usage:</p>
<pre><code>kill 123</code></pre>
<p>Output:</p>
<pre><code></code></pre>
<p>If the process is killed, then the output will be empty. </p>
</div>
<div class="command">
<h3>14. <code>killall</code></h3>
<p>This command is used to kill all processes by name. You can use <code>killall</code> then the process
name to kill all processes by name. You can also use <code>killall -9</code> then the process name
to kill all processes by name forcefully.</p>
<p>Usage:</p>
<pre><code>killall bash</code></pre>
<p>Output:</p>
<pre><code></code></pre>
<p>If the process is killed, then the output will be empty. </p>
</div>
<div class="command">
<h3>15. <code>pkill</code></h3>
<p>This command is used to kill a process by name. You can use <code>pkill</code> then the process name
to kill a process by name. You can also use <code>pkill -9</code> then the process name to kill a
process by name forcefully.</p>
<p>Usage:</p>
<pre><code>pkill bash</code></pre>
<p>Output:</p>
<pre><code></code></pre>
<p>If the process is killed, then the output will be empty. </p>
</div>
<div class="command">
<h3>16. <code>pgrep</code></h3>
<p>This command is used to find the process ID by name. You can use <code>pgrep</code> then the process
name to find the process ID by name.</p>
<p>Usage:</p>
<pre><code>pgrep bash</code></pre>
<p>Output:</p>
<pre><code>123</code></pre>
<p>If the process is found, then the output will be the process ID. If there is nothing, then the output
will be empty. </p>
</div>
<div class="command">
<h3>17. <code>top</code></h3>
<p>This command is used to display the dynamic real-time view of a running system. You can use
<code>top</code> to display the dynamic real-time view of a running system. You can use the
<code>q</code> key to quit the display.
</p>
<p>Usage:</p>
<pre><code>top</code></pre>
<p>Output:</p>
<pre><code>
top - 10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10
Tasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie
%Cpu(s): 10.0 us, 10.0 sy, 10.0 ni, 10.0 id, 10.0 wa, 10.0 hi, 10.0 si, 10.0 st
MiB Mem : 1000.0 total, 100.0 free, 900.0 used, 100.0 buff/cache
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
123 username 20 0 100.0m 10.0m 10.0m S 10.0 1.0 10:10.10 bash
</code></pre>
<p>If the system is running, then the output will be the system information. If there is nothing, then
the output will be empty.</p>
</div>
<div class="command">
<h3>18. <code>htop</code></h3>
<p>This command is used to display the dynamic real-time view of a running system. You can use
<code>htop</code> to display the dynamic real-time view of a running system. You can use the
<code>q</code> key to quit the display.
</p>
<p>Usage:</p>
<pre><code>htop</code></pre>
<p>Output:</p>
<div class="container">
<img src="htop.png" alt="Htop image" width="100%" class="htop-image">
</div>
</div>
<div class="command">
<h3>19. <code>free</code></h3>
<p>This command is used to display the amount of free and used memory in the system. You can use
<code>free</code> to display the amount of free and used memory in the system.
</p>
<p>Usage:</p>
<pre><code>free</code></pre>
<p>Output:</p>
<pre><code>
total used free shared buff/cache available
Mem: 1000.0 900.0 100.0 10.0 100.0 100.0
Swap: 1000.0 900.0 100.0
</code></pre>
</div>
<div class="command">
<h3>20. <code>df</code></h3>
<p>This command is used to display the amount of disk space available on the file system. You can use
<code>df</code> to display the amount of disk space available on the file system. You can also use
<code>df -h</code> to display the amount of disk space available on the file system in
human-readable format. You can also use <code>df -T</code> to display the amount of disk space
available on the file system with the file system type.
</p>
<p>Usage:</p>
<pre><code>df</code></pre>
<p>Output:</p>
<pre><code>
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1000000 0 1000000 0% /dev
tmpfs 1000000 100 100000 1% /run
/dev/sda1 1000000 10000 900000 1% /
tmpfs 1000000 100 100000 1% /dev/shm
tmpfs 1000000 100 100000 1% /run/lock
tmpfs 1000000 100 100000 1% /sys/fs/cgroup
/dev/sda2 1000000 10000 900000 1% /home
tmpfs 1000000 100 100000 1% /run/user/1000
</code></pre>
</div>
</section>
<section id="all-in-one-chart" class="chart">
<h2>All in one chart</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
<th>Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ls</code></td>
<td>List files and directories</td>
<td><code>ls</code></td>
</tr>
<tr>
<td><code>cd</code></td>
<td>Change directory</td>
<td><code>cd directory</code></td>
</tr>
<tr>
<td><code>pwd</code></td>
<td>Print current working directory</td>
<td><code>pwd</code></td>
</tr>
<tr>
<td><code>touch</code></td>
<td>Create a new file</td>
<td><code>touch file.txt</code></td>
</tr>
<tr>
<td><code>mkdir</code></td>
<td>Create a new directory</td>
<td><code>mkdir directory</code></td>
</tr>
<tr>
<td><code>rm</code></td>
<td>Remove files or directories</td>
<td><code>rm file.txt</code></td>
</tr>
<tr>
<td><code>cp</code></td>
<td>Copy files or directories</td>
<td><code>cp file.txt file2.txt</code></td>
</tr>
<tr>
<td><code>mv</code></td>
<td>Move files or directories</td>
<td><code>mv file.txt directory</code></td>
</tr>
<tr>
<td><code>cat</code></td>
<td>Display the contents of a file</td>
<td><code>cat file.txt</code></td>
</tr>
<tr>
<td><code>more</code></td>
<td>Display the contents of a file one page at a time</td>
<td><code>more file.txt</code></td>
</tr>
<tr>
<td><code>less</code></td>
<td>Display the contents of a file one page at a time</td>
<td><code>less file.txt</code></td>
</tr>
<tr>
<td><code>head</code></td>
<td>Display the first few lines of a file</td>
<td><code>head file.txt</code></td>
</tr>
<tr>
<td><code>tail</code></td>
<td>Display the last few lines of a file</td>
<td><code>tail file.txt</code></td>
</tr>
<tr>
<td><code>grep</code></td>
<td>Search for a pattern in a file</td>
<td><code>grep "pattern" file.txt</code></td>
</tr>
<tr>
<td><code>find</code></td>
<td>Find files or directories</td>
<td><code>find directory</code></td>
</tr>
<tr>
<td><code>whereis</code></td>
<td>Find the binary, source, and manual page files for a command</td>
<td><code>whereis ls</code></td>
</tr>
<tr>
<td><code>which</code></td>
<td>Find the location of a command</td>
<td><code>which ls</code></td>
</tr>
<tr>
<td><code>man</code></td>
<td>Display the manual page of a command</td>
<td><code>man brew</code></td>
</tr>
<tr>
<td><code>chmod</code></td>
<td>Change the permissions of a file or directory</td>
<td><code>chmod 777 file.txt</code></td>
</tr>
<tr>
<td><code>chown</code></td>
<td>Change the owner of a file or directory</td>
<td><code>chown owner file.txt</code></td>
</tr>
<tr>
<td><code>whoami</code></td>
<td>Print the current user</td>
<td><code>whoami</code></td>
</tr>
<tr>
<td><code>date</code></td>
<td>Print the current date and time</td>
<td><code>date</code></td>
</tr>
<tr>
<td><code>cal</code></td>
<td>Print the calendar of the current month</td>
<td><code>cal</code></td>
</tr>
<tr>
<td><code>clear</code></td>
<td>Clear the terminal</td>
<td><code>clear</code></td>
</tr>
<tr>
<td><code>echo</code></td>
<td>Print a message</td>
<td><code>echo "Hello World"</code></td>
</tr>
<tr>
<td><code>uname</code></td>
<td>Print the system information</td>
<td><code>uname</code></td>
</tr>
<tr>
<td><code>uptime</code></td>
<td>Print the uptime of the system</td>
<td><code>uptime</code></td>
</tr>
<tr>
<td><code>w</code></td>
<td>Print the users who are currently logged in and what they are doing</td>
<td><code>w</code></td>
</tr>
<tr>
<td><code>who</code></td>
<td>Print the users who are currently logged in</td>
<td><code>who</code></td>
</tr>
<tr>
<td><code>ps</code></td>
<td>Print the currently running processes</td>
<td><code>ps</code></td>
</tr>
<tr>
<td><code>kill</code></td>
<td>Kill a process</td>
<td><code>kill 123</code></td>
</tr>
<tr>
<td><code>killall</code></td>
<td>Kill all processes by name</td>
<td><code>killall bash</code></td>
</tr>
<tr>
<td><code>pkill</code></td>
<td>Kill a process by name</td>
<td><code>pkill bash</code></td>
</tr>
<tr>
<td><code>pgrep</code></td>
<td>Find the process ID by name</td>
<td><code>pgrep bash</code></td>
</tr>
<tr>
<td><code>top</code></td>
<td>Display the dynamic real-time view of a running system</td>
<td><code>top</code></td>
</tr>
<tr>
<td><code>htop</code></td>
<td>Display the dynamic real-time view of a running system</td>
<td><code>htop</code></td>
</tr>
<tr>
<td><code>free</code></td>
<td>Display the amount of free and used memory in the system</td>
<td><code>free</code></td>
</tr>
<tr>
<td><code>df</code></td>
<td>Display the amount of disk space available on the file system</td>
<td><code>df</code></td>
</tr>
</tbody>
</table>
</section>
<section id="contributing">
<h2>Contributing</h2>
<p>Contributions are what make the open-source community such an amazing place to learn, inspire, and
create. Any contributions you make are <strong>greatly appreciated</strong>.</p>
<ol>
<li>Fork the Project</li>
<li>Create your Feature Branch</li>
<li>Commit your Changes</li>
<li>Push to the Branch</li>
<li>Open a Pull Request</li>
</ol>
</section>
<section id="license">
<h2>License</h2>
<p>This repo is licensed under the MIT license. See <a href="LICENSE.md">LICENSE.md</a> for more details.
</p>
</section>
<section id="author">
<h2>Author</h2>
<p>Muntasir Mahmud (Also known in GitHub as MuntasirSZN)</p>
</section>
<section id="conclusion">
<h2>Conclusion</h2>
<p>I hope this repo helps you to memorize the Linux commands. If you have any questions, then you can ask me in the issues section. I will try to answer your questions as soon as possible. If you want to
contribute to this repo, then you can fork this repo and make a pull request. I will review the pull
request and merge it if it is good. I hope this repo helps you. Thank you for reading this repo. Have a
nice day. Goodbye.👋👋👋
</p>
<p><strong>And</strong>, don't forget to give a star to this repo.⭐⭐⭐</p>
</section>
</div>
<script src="script.js"></script>
</body>
</html>