Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/lesson/boot-process-bootloader.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ <h3>Boot Process: Bootloader</h3>
<p>The most common bootloader for Linux is GRUB, you are most likely using it on your system. There are many other bootloaders that you can use such as LILO, efilinux, coreboot, SYSLINUX and more. However, we will just be working with GRUB as our bootloader. </p>
<p>So we know that the bootloader's main goal is to load up the kernel, but where does it find the kernel? To find it, we will need to look at our kernel parameters. The parameters can be found by going into the GRUB menu on startup using the 'e' key. If you don't have GRUB no worries, we'll go through the boot parameters that you will see:</p>
<ul>
<li>initrd - Specifies the location of initial RAM disk (we'll talk more about this in the next lesson).
<li>initrd - Specifies the location of initial RAM disk (we'll talk more about this in the next lesson).</li>
<li>BOOT_IMAGE - This is where the kernel image is located</li>
<li>root - The location of the root filesystem, the kernel searches inside this location to find init. It is often represented by it's UUID or the device name such as /dev/sda1.</li>
<li>ro - This parameter is pretty standard, it mounts the fileystem as read-only mode.</li>
<li>quiet - This is added so that you don't see display messages that are going on in the background during boot.</li>
<li>splash - This lets the splash screen be shown.</li>
</li></ul>
</ul>

</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion docs/lesson/copy-cp-command.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ <h3>cp (Copy)</h3>
<p>Let’s start making some copies of these files. Much like copy and pasting files in other operating systems, the shell gives us an even simpler way of doing that. </p>
<pre>$ cp mycoolfile /home/pete/Documents/cooldocs</pre>
<p>mycoolfile is the file you want to copy and /home/pete/Documents/cooldocs is where you are copying the file to.</p>
<p>You can copy multiple files and directories as well as use wildcards. A wildcard is a character that can be substituted for a pattern based selection, giving you more flexibility with searches. You can use wildcards in every command for more flexibility.</p>
<p>You can copy multiple files and directories as well as use wildcards. A wildcard is a character that can be substituted for a pattern based selection, giving you more flexibility with searches.</p>
<p>Wildcards are not a feature of cp, they are a feature of the shell. Before cp ever runs, the shell replaces the pattern with the list of matching filenames, so cp only ever sees ordinary filenames. That means wildcards work the same way with almost any command, and it also means the shell expands them against the files that exist right now.</p>
<ul>
<li>* the wildcard of wildcards, it's used to represent all single characters or any string.</li>
<li>? used to represent one character</li>
Expand Down
6 changes: 4 additions & 2 deletions docs/lesson/help-command.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@
<h3>help</h3>
<p>Linux has some great built-in tools to help you how to use a command or check what flags are available for a command. One tool, help, is a built-in bash command that provides help for other bash commands (echo, logout, pwd, etc).</p>
<pre>$ help echo</pre>
<p>This will give you a description and the options you can use when you want to run echo. For other executable programs, it’s convention to have an option called --help or something similar. </p>
<pre>$ echo --help</pre>
<p>This will give you a description and the options you can use when you want to run echo. Note that help only works on built-ins, so <b>help ls</b> won’t work, because ls is a separate program rather than something built into the shell.</p>
<p>For other executable programs, it’s convention to have an option called --help or something similar. </p>
<pre>$ ls --help</pre>
<p>Don’t expect this to work on built-ins though. Since the shell handles them itself, <b>echo --help</b> won’t print any help, it will just echo the text --help back at you.</p>
<p>Not all developers who ship out executables will conform to this standard, but it’s probably your best shot to find some help on a program.</p>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/lesson/modifying-permissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h3>Modifying Permissions</h3>
<p><b>Removing permission bit on a file</b><br/>
<pre>$ chmod u-x myfile</pre></p>
<p><b>Adding multiple permission bits on a file</b><br/>
<pre>$ chmod ug+w</pre></p>
<pre>$ chmod ug+w myfile</pre></p>
<p>There is another way to change permissions using numerical format. This method allows you to change permissions all at once. Instead of using r, w, or x to represent permissions, you'll use a numerical representation for a single permission set. So no need to specify the group with g or the user with u.</p>
<p>The numerical representations are seen below:</p>
<ul>
Expand Down
13 changes: 7 additions & 6 deletions docs/lesson/package-management-systems.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,20 @@ <h3>yum and apt</h3>
<p>Ah, the Batmans of package management, these systems come with all the fixins to make package installation, removal and changes easier, including installing package dependencies. Two of the most popular management systems is <b>yum</b> and <b>apt</b>. Yum is exclusive to the Red Hat family and apt is exclusively to the Debian family.</p>
<p><b>Install a package from a repository</b></p>
<pre>
Debian: $ apt install package_name
RPM: $ yum install package_name
Debian: $ sudo apt install package_name
RPM: $ sudo yum install package_name
</pre>
<p>Note the sudo. Installing and removing software changes the whole system, not just your own files, so these commands need superuser access. Only the commands that just read information, like apt show, work without it.</p>
<p><b>Remove a package</b></p>
<pre>
Debian: $ apt remove package_name
RPM: $ yum erase package_name
Debian: $ sudo apt remove package_name
RPM: $ sudo yum erase package_name
</pre>
<p><b>Updating packages for a repository</b></p>
<p>It's always best practice to update your package repositories so they are up to date before you install and update a package. </p>
<pre>
Debian: apt update; apt upgrade
RPM: yum update
Debian: sudo apt update; sudo apt upgrade
RPM: sudo yum update
</pre>
<p><b>Get information about an installed package</b></p>
<pre>
Expand Down
15 changes: 6 additions & 9 deletions docs/lesson/regular-expressions-regex.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,16 @@ <h3>Exercise</h3>
<p>Try to combine regular expressions with grep and search through some files.</p>
<pre>
grep [regular expression here] [file]
</pre>

## Quiz Question

What regular expression would you use to match a single character?

## Quiz Answer

.
</pre></div
</div>

<div class="quiz-content">
>
<h3>Quiz Question</h3>
<p>What regular expression would you use to match a single character?</p>
<h3>Quiz Answer</h3>
<p>.</p>
</div>

</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion docs/lesson/remove-rm-command.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h3>rm (Remove)</h3>
<p>Adding the -i flag like many of the other commands, will give you a prompt on whether you want to actually remove the files or directories. </p>
<pre>$ rm -r directory</pre>
<p>You can’t just rm a directory by default, you’ll need to add the -r flag (recursive) to remove all the files and any subdirectories it may have.</p>
<p>You can remove a directory with the rmdir command.</p>
<p>There is also the rmdir command, but it only removes a directory that is already empty. It will refuse to do anything if there is still something inside, which makes it a much safer choice than rm -r when you only mean to clean up an empty directory.</p>
<pre>$ rmdir directory</pre>

</div>
Expand All @@ -168,6 +168,7 @@ <h3>Exercise</h3>
<h3>Quiz Question</h3>
<p>How do you remove a file called myfile?</p>
<h3>Quiz Answer</h3>
<p>rm myfile</p>
</div>

</div>
Expand Down
4 changes: 1 addition & 3 deletions docs/lesson/stdout-standard-out-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ <h3>Exercise</h3>
<h3>Quiz Question</h3>
<p>What redirector do you use to append output to a file? </p>
<h3>Quiz Answer</h3>
<blockquote>
<blockquote></blockquote>
</blockquote>
<p>&gt;&gt;</p>
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/lesson/systemd-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ <h3>Systemd Overview</h3>
<ol>
<li>First, systemd loads it's configuration files, usually located in /etc/systemd/system or /usr/lib/systemd/system</li>
<li>Then it determines its boot goal, which is usually default.target</li>
<li>Systemd figures out the dependencies of the boot target and activates them
</li></ol>
<li>Systemd figures out the dependencies of the boot target and activates them</li>
</ol>
<p>Similar to Sys V runlevels, systemd boots into different targets:</p>
<ul>
<li>poweroff.target - shutdown system</li>
Expand Down
26 changes: 15 additions & 11 deletions docs/lesson/umask.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ <h3>Umask</h3>
<p>Every file that gets created comes with a default set of permissions. If you ever wanted to change that default set of permissions, you can do so with the umask command. This command takes the 3 bit permission set we see in numerical permissions. </p>
<p>Instead of adding these permissions though, umask takes away these permissions. </p>
<pre>$ umask 021</pre>
<p>In the above example, we are stating that we want the default permissions of new files to allow users access to everything, but for groups we want to take away their write permission and for others we want to take away their executable permission. The default umask on most distributions is 022, meaning all user access, but no write access for group and other users.</p>
<p>In the above example, we are taking nothing away from the user, taking the write permission away from the group, and taking the execute permission away from everyone else.</p>
<p>Now, what is umask subtracting from? Not 777, as you might expect. The system starts from 666 for a new file and 777 for a new directory, and then removes the umask bits. Files start at 666 because it would be a bad idea to make every file you create executable.</p>
<p>So with the common default umask of 022:</p>
<pre>
new file: 666 - 022 = 644 (rw-r--r--)
new directory: 777 - 022 = 755 (rwxr-xr-x)
</pre>
<p>This is why a file you just made is not executable even though your umask leaves the user bits alone. If you want to run it as a program, you still have to add the execute bit yourself with chmod.</p>
<p>When you run the umask command it will give that default set of permissions on any new file you make. However, if you want it to persist you'll have to modify your startup file (.profile), but we'll discuss that in a later lesson.</p>

</div>
Expand All @@ -98,20 +105,17 @@ <h3>Exercise</h3>
<li>Create a new file, then note it's permissions.</li>
<li>Modify the umask and then create another new file.</li>
<li>Check the permissions once more on the new file, what do you expect to see?</li>
<ol>

## Quiz Question

What command is used to change default file permissions?

## Quiz Answer
<li>Make a new directory as well and compare its permissions to the new file's.</li>
</ol>

umask
</ol></ol></div
</div>

<div class="quiz-content">
>
<h3>Quiz Question</h3>
<p>What command is used to change default file permissions?</p>
<h3>Quiz Answer</h3>
<p>umask</p>
</div>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,8 @@ <h3>cp (Copy)</h3>
<pre>$ cp mycoolfile /home/pete/Documents/cooldocs</pre>

<p>mycoolfile is the file you want to copy and /home/pete/Documents/cooldocs is where you are copying the file to.</p>
<p>You can copy multiple files and directories as well as use wildcards. A wildcard is a character that can be substituted for a pattern based selection, giving you more flexibility with searches. You can use wildcards in every command for more flexibility.</p>
<p>You can copy multiple files and directories as well as use wildcards. A wildcard is a character that can be substituted for a pattern based selection, giving you more flexibility with searches.</p>
<p>Wildcards are not a feature of cp, they are a feature of the shell. Before cp ever runs, the shell replaces the pattern with the list of matching filenames, so cp only ever sees ordinary filenames. That means wildcards work the same way with almost any command, and it also means the shell expands them against the files that exist right now.</p>
<ul>
<li>* the wildcard of wildcards, it's used to represent all single characters or any string.</li>
<li>? used to represent one character</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Let’s start making some copies of these files. Much like copy and pasting file

mycoolfile is the file you want to copy and /home/pete/Documents/cooldocs is where you are copying the file to.

You can copy multiple files and directories as well as use wildcards. A wildcard is a character that can be substituted for a pattern based selection, giving you more flexibility with searches. You can use wildcards in every command for more flexibility.
You can copy multiple files and directories as well as use wildcards. A wildcard is a character that can be substituted for a pattern based selection, giving you more flexibility with searches.

Wildcards are not a feature of cp, they are a feature of the shell. Before cp ever runs, the shell replaces the pattern with the list of matching filenames, so cp only ever sees ordinary filenames. That means wildcards work the same way with almost any command, and it also means the shell expands them against the files that exist right now.

<ul>
<li>* the wildcard of wildcards, it's used to represent all single characters or any string.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ <h3>rm (Remove)</h3>
<pre>$ rm -r directory</pre>

<p>You can’t just rm a directory by default, you’ll need to add the -r flag (recursive) to remove all the files and any subdirectories it may have.</p>
<p>You can remove a directory with the rmdir command.</p>
<p>There is also the rmdir command, but it only removes a directory that is already empty. It will refuse to do anything if there is still something inside, which makes it a much safer choice than rm -r when you only mean to clean up an empty directory.</p>
<pre>$ rmdir directory</pre>

<h3>Exercise</h3>
Expand All @@ -900,6 +900,7 @@ <h3>Exercise</h3>
<h3>Quiz Question</h3>
<p>How do you remove a file called myfile?</p>
<h3>Quiz Answer</h3>
<p>rm myfile</p>
</div>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Adding the -i flag like many of the other commands, will give you a prompt on wh

You can’t just rm a directory by default, you’ll need to add the -r flag (recursive) to remove all the files and any subdirectories it may have.

You can remove a directory with the rmdir command.
There is also the rmdir command, but it only removes a directory that is already empty. It will refuse to do anything if there is still something inside, which makes it a much safer choice than rm -r when you only mean to clean up an empty directory.

<pre>$ rmdir directory</pre>

Expand All @@ -39,4 +39,6 @@ You can remove a directory with the rmdir command.

How do you remove a file called myfile?

## Quiz Answer
## Quiz Answer

rm myfile
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,11 @@ <h3>help</h3>
<p>Linux has some great built-in tools to help you how to use a command or check what flags are available for a command. One tool, help, is a built-in bash command that provides help for other bash commands (echo, logout, pwd, etc).</p>
<pre>$ help echo</pre>

<p>This will give you a description and the options you can use when you want to run echo. For other executable programs, it’s convention to have an option called --help or something similar. </p>
<pre>$ echo --help</pre>
<p>This will give you a description and the options you can use when you want to run echo. Note that help only works on built-ins, so <b>help ls</b> won’t work, because ls is a separate program rather than something built into the shell.</p>
<p>For other executable programs, it’s convention to have an option called --help or something similar. </p>
<pre>$ ls --help</pre>

<p>Don’t expect this to work on built-ins though. Since the shell handles them itself, <b>echo --help</b> won’t print any help, it will just echo the text --help back at you.</p>
<p>Not all developers who ship out executables will conform to this standard, but it’s probably your best shot to find some help on a program.</p>
<h3>Exercise</h3>
<p>Run help on the echo command, logout command and pwd command.</p>
Expand Down
8 changes: 6 additions & 2 deletions lessons/locales/en_english/02-command-line/15-help-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ Linux has some great built-in tools to help you how to use a command or check wh

<pre>$ help echo</pre>

This will give you a description and the options you can use when you want to run echo. For other executable programs, it’s convention to have an option called --help or something similar.
This will give you a description and the options you can use when you want to run echo. Note that help only works on built-ins, so <b>help ls</b> won’t work, because ls is a separate program rather than something built into the shell.

<pre>$ echo --help</pre>
For other executable programs, it’s convention to have an option called --help or something similar.

<pre>$ ls --help</pre>

Don’t expect this to work on built-ins though. Since the shell handles them itself, <b>echo --help</b> won’t print any help, it will just echo the text --help back at you.

Not all developers who ship out executables will conform to this standard, but it’s probably your best shot to find some help on a program.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,7 @@ <h3>Exercise</h3>
<h3>Quiz Question</h3>
<p>What redirector do you use to append output to a file? </p>
<h3>Quiz Answer</h3>
<blockquote>
<blockquote></blockquote>
</blockquote>
<p>&gt;&gt;</p>
</div>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ What redirector do you use to append output to a file?

## Quiz Answer

>>
&gt;&gt;
Original file line number Diff line number Diff line change
Expand Up @@ -928,14 +928,12 @@ <h3>Exercise</h3>
<p>Try to combine regular expressions with grep and search through some files.</p>
<pre>
grep [regular expression here] [file]
</pre>

## Quiz Question

What regular expression would you use to match a single character?

## Quiz Answer

.
<h3>Quiz Question</h3>
<p>What regular expression would you use to match a single character?</p>
<h3>Quiz Answer</h3>
<p>.</p>
</div>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Try to combine regular expressions with grep and search through some files.

<pre>
grep [regular expression here] [file]
</pre>

## Quiz Question

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ <h3>Modifying Permissions</h3>
<p><b>Removing permission bit on a file</b><br />
<pre>$ chmod u-x myfile</pre></p>
<p><b>Adding multiple permission bits on a file</b><br />
<pre>$ chmod ug+w</pre></p>
<pre>$ chmod ug+w myfile</pre></p>
<p>There is another way to change permissions using numerical format. This method allows you to change permissions all at once. Instead of using r, w, or x to represent permissions, you'll use a numerical representation for a single permission set. So no need to specify the group with g or the user with u.</p>
<p>The numerical representations are seen below:</p>
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The above command reads like this: change permission on myfile by adding executa
<pre>$ chmod u-x myfile</pre>

<b>Adding multiple permission bits on a file</b>
<pre>$ chmod ug+w</pre>
<pre>$ chmod ug+w myfile</pre>

There is another way to change permissions using numerical format. This method allows you to change permissions all at once. Instead of using r, w, or x to represent permissions, you'll use a numerical representation for a single permission set. So no need to specify the group with g or the user with u.

Expand Down
Loading