Nano is a command line text editor that we will use to create and edit all our HTML / CSS files. This will allow students to "remote" into the web server and create files on the server while connected remotely. This eliminates the need to transfer files from one machine to another.
Launch the Nano text editor:
sudo nano mr_cool.txt
You should see this:
We are now in the text editor, editing the file mr_cool.txt.
At the bottom we can see the commands for the text editor.
The ^ symbol is the "control" key on your keyboard. So "^O" is "control + O". This will write out our data or save the file.
The grey box is the cursor. We can't use the mouse while in the terminal, so we must use our arrow keys to navigate around the file once we start typing.
After I type some text into the file and press "control + O" you will see this:
Notice it says "File Name to Write: mr_cool.txt". I can rename the file if I want, if not I just need to press "return" to save it.
Then you should see the "Wrote XX lines". This tells you how many lines of text were saved.
Then we can type ^X (control + X) to quit Nano.
We can use the "more" command to see what's inside our text file:
more mr_cool.txt
Extensions go at the end of files:
image.jpg (.jpg is an image file. This tells the computer (and you!) that there is image information inside.)
dog.gif (.gif is an image file. This tells the computer that there is image information inside.)
report.txt (.txt is a text file. This tells the computer that there is text inside.)
scuba.html (.html is an HTML file. This tells the computer there is HTML code inside.)