This is normal text, which may label or tell something, it is rare in these lessons
This italics text is a note that helps teach and explain something in a lesson
The following is called "preformatted text", AKA "code text", which uses a "monospace" font: preformatted monospace text maybe italics all the same
Below is a file named "some-file.txt" and it's contents...
| some-file.txt :
I am plain text.
I am the contents of some-file.txt.
I am not a terminal command because I have no dollar sign nor hash sign.
I belong in your text editor where some-file.txt is open.
When using copy-paste to enter a command into the terminal, Ctrl + C will work in a normal window, but use Ctrl + Shift + V to paste into the terminal
| 1 :$
echo i am a command to be entered in the terminalThese "command" numbers help keep track of your place in the lesson and clarify which code you should enter into the terminal
| 2 :$ This is a very important note specifically about the command just entered
echo i am another terminal command| 3 :$
third terminal commandNote those were three terminal commands, but the third one didn't actually work, but you should have entered it anyway just to watch it not work
preformatted code like this that does not have a number is only for reference, not to be entered into the terminal
Let's enter the fourth and final command, which also won't work
| 4 :$
fourth broken commandLook at this code:
code CODE -code foo Something CODE $code code bar $AnotherThing code $CODE mySomeThing
Something$AnotherThingmySomeThingfoobar
...these are all "placeholders" because they mix upper and lower case, their text could be anything
...foo and bar are also normal conventions for demonstrating text that you would replace in your project
Everything wtih all caps or all lowercase (code or CODE) probably doesn't change in the Shell language
Sometimes, a placeholder example may appear as your_user_name, username, ENVIRONMENT_CONSTANT, etc, which should be somewhat obvious as placeholders
Nautilus (file explorer) works alongside the terminal
Before starting a lesson, open Nautilus from the GUI
(GUI stands for Graphic User Interface, the normal windows of a desktop environment)
First, make the directory "School" (if it doesn't already exist)...
| 5 :$
mkdir -p ~/SchoolChange the terminal to that directory
| 6 :$
cd ~/SchoolOpen Nautilus file explorer in that directory with: nautilus .
| 7 :$
nautilus .Before starting a lesson, open gedit from the GUI
| 8 :$
gedit first-fileNote that "first-file" is in the title of gedit, the text editor
Create first-file as this:
(Copy-Paste this into first-file in gedit:)
| first-file :
This is a new file.
# v01Note the asterisk * in the title of gedit
Use Ctrl + S to save the file
Note the asterisk * went away and the file "first-file" appeared in Nautilus
Update first-file to version 02:
After copying the text below via Ctrl + C, in gedit, use Ctrl + A, Ctrl + V, Ctrl + S
| first-file :
This is the same file, but a new version
# v02Version 2 of first-file should now be saved
Let's remove that file since we no longer need it
| 9 :$
rm first-fileNote gedit still has the file open
Close gedit, but note it asks if you want to save the file: No, don't save
Yeah! Orientaion is finished! Let's review what we take away from this...
- GUI stands for "Graphic User Interface"
- This may also be called "using the desktop"
- CLI stands for "Command Line Interface"
- CLI commands can be entered into the terminal
- This is called "using the CLI"
- Non-commands entered into the terminal will return an error message
preformattedtext (AKAcode) is either a terminal command or part of code that belongs in a file- This is normal for most code-related websites
- | 1 :$ indicates a command to be entered in the terminal
code for terminal- Nautilus is the name of the file browser... because we're "under the sea..."
- Gedit is the text editor we will use, gedit? (See what I did there?)
- An asterisk * in the gedit title indicates that the file has been changed, but not saved
- If a file is deleted while open in gedit, gedit will ask if you want to save before closing