Welcome to the Introduction to Bash lessons. I know it's scary, but you can do this!
The first thing you need to do is start the terminal. Do that by clicking the "hamburger" menu at the top left of the screen, going to the "terminal" section, and clicking "new terminal". Once you open a new one, type echo hello terminal
into the terminal and press enter.
- Capitalization matters
- If the tests don't run automatically, try typing
exit
into the terminal and redoing the instructions
What you see in the terminal below is a folder (or directory) on this machine. Type pwd
into the terminal and press enter to see the path of the folder. pwd
stands for "print working directory".
- Type
pwd
into the terminal and press enter - Make sure you are in the
project
folder when you enter the command - Enter
cd /workspace/project
to get to theproject
folder if you aren't there
The output tells you where the folder you are in is located. You are in the project
folder, which is in the workspace
folder. Type ls
into the terminal to see what's in this folder. ls
stands for "list".
- Type
ls
into the terminal and press enter - Make sure you are in the
project
folder when you enter the command - Enter
cd /workspace/project
to get to theproject
folder if you aren't there
The output is showing everything in this folder. There's one folder in here. You can use cd <folder_name>
to go into a folder. cd
stands for "change directory". Change to the freeCodeCamp
directory.
- Capitalization matters
- Type
cd freeCodeCamp
into the terminal and press enter - Make sure you start in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there
You are in the freecodecamp
folder now. You may have noticed that the prompt changed to include it. Print the working directory of the freeCodeCamp
folder to see the full path of where you are.
- Use the "print working directory" command
- Type
pwd
into the terminal and press enter - Make sure you are in the
freeCodeCamp
folder first - Enter
cd /workspace/project/freeCodeCamp
to get to thefreeCodeCamp
folder if you aren't there
You can see the path of the freeCodeCamp
folder. It's in the project
folder you were just in. List the contents of the freeCodeCamp
folder to see what's here.
- Use the "list" command
- Try typing
ls
into the terminal - Make sure you are in the
freeCodeCamp
folder first - Enter
cd /workspace/project/freeCodeCamp
to get to thefreeCodeCamp
folder if you aren't there
There's several folders and files here. The folders are blue or green and the files include their extension. Next, change to that test
directory.
- Use the "change directory" command
- Here's an example:
cd folder-name
- Try entering
cd test
- Make sure you enter the command from the
freeCodeCamp
folder - Enter
cd /workspace/project/freeCodeCamp
to get to thefreeCodeCamp
folder if you aren't there
You can see you are in the test
folder now. It shows test
in the prompt. Print the full path of this directory. Remember that "folder" and "directory" are the same thing.
- Use the "print working directory" command
- Type
pwd
into the terminal - Make sure you are in the
test
folder first - Enter
cd /workspace/project/freeCodeCamp/test
to get to thetest
folder if you aren't there
That's the path to the test
folder, it's in the freeCodeCamp
folder. List the contents of this folder.
- Use the "list" command
- Type
ls
into the terminal - Make sure you are in the
test
folder first - Enter
cd /workspace/project/freeCodeCamp/test
to get to thetest
folder if you aren't there
These are all files. There's no more folders to go into here. You can use cd ..
to go back a folder level. The two dots will take you back one level. Go back to the freeCodeCamp
folder.
- Use the "change directory" command
- Type
cd ..
into the terminal end press enter - Type the command from the
test
folder - Enter
cd /workspace/project/freeCodeCamp/test
to get to thetest
folder if you aren't there
test
got removed from the prompt since you left that folder and you're back in the freeCodeCamp
folder. List the contents of what's here to remind yourself.
- Use the "list" command
- Type
ls
into the terminal - Make sure you are in the
freeCodeCamp
folder first - Enter
cd /workspace/project/freeCodeCamp
to get to thefreeCodeCamp
folder if you aren't there
There's the test
folder you were just in. You can see what's in a file with more <filename>
. Use it to view what's in the package.json
file.
- Type
more package.json
into the terminal - Press enter until you have seen the whole file
- Make sure you are in the
freeCodeCamp
folder first - Enter
cd /workspace/project/freeCodeCamp
to get to thefreeCodeCamp
folder if you aren't there
It looks like a JSON object. You can empty the terminal with clear
. The terminal looks a little cluttered, why don't you clear it.
- Commands are case sensitive
- Enter
clear
into the terminal
Now you have a fresh screen 😄 List what's in here again.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
freeCodeCamp
folder first - Enter
cd /workspace/project/freeCodeCamp
to get to thefreeCodeCamp
folder if you aren't there
You checked out the test
folder and the package.json
file. What next? Why don't you go into that node_modules
directory.
- Use the "change directory" command
- Here's an example:
cd <folder_name>
- Enter
cd node_modules
into the terminal - Enter
cd /workspace/project/freeCodeCamp
to get back to thefreeCodeCamp
folder and try again
Now the prompt includes node_modules
since that's where you are. List what's in the folder.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
node_modules
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules
to get to thenode_modules
folder if you aren't there
That's a lot of folders. You can add a flag to a command to use it different ways like this: ls <flag>
. List the contents of the node_modules
folder in "long list format". Do that by adding the -l
flag to the "list" command.
- Use the "list" command
- Add the
-l
flag to the command - That's a lowercase letter
l
, not the number1
- Enter
ls -l
into the terminal - Make sure you are in the
node_modules
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules
to get to thenode_modules
folder if you aren't there
It is showing more details about each item in here and it's a little easier to read. One of the folders is named has
, why don't you change into it.
- Use the "change directory" command
- Enter
cd has
into the terminal - Enter the command from the
node_modules
folder - Enter
cd /workspace/project/freeCodeCamp/node_modules
to get to thenode_modules
folder if you aren't there
You are now in the has
folder. List its contents.
- Use the "list" command
- Enter
ls
into the terminal - Enter the command from the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
There's a few files and folders here. Can you tell the difference? Take a look at more of that README.md
file.
- Commands and filenames are case sensitive
- Use the "more" command
- Enter
more README.md
into the terminal - Press "enter" until you have seen the whole file
- Make sure you are in the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
Nothing noteworthy in there. You can't see what's in the here anymore, list the contents again.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
That one file doesn't appear to have an extension. Strange. Take a look at more of the that "license" file that doesn't show an extension.
- Use the "more" command
- Enter
more LICENSE-MIT
into the terminal - Press "enter" until you have seen the whole file
- Make sure you are in the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
Pretend you read all that. It looks a little messy in here again so why don't you clear the terminal.
- Use the "clear" command
- Enter
clear
into the terminal
Better. Remind yourself what's in here with the list command.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
Go into that src
directory to see what you can find in there.
- Use the "change directory" command
- Enter
cd src
into the terminal - Make sure you are in the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
View the full path of this folder.
- Use the "print working directory" command
- Enter
pwd
into the terminal - Make sure you are in the
src
folder - Enter
cd /workspace/project/freeCodeCamp/node_modules/has/src
to get to thesrc
folder if you aren't there
Getting deeper still. You can see that each new folder has a /
in front of it. Take a look at what's in this folder.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
src
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has/src
to get to thesrc
folder if you aren't there
Only one file here. Show me what's in it with more
.
- Use the
more
command - Here's and example:
more filename
- Enter
more index.js
into the terminal - Press enter until you've seen all the content
- Make sure you are in the
src
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has/src
to get to thesrc
folder if you aren't there
It's some JavaScript 😄 I think you've fooled around enough. Why don't you navigate out of here. Change back to the has
directory.
- Use the "change directory" command
- Add
..
aftercd
to go back a folder - Type
cd ..
into the terminal - Make sure you are in the
src
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has/src
to get to thesrc
folder if you aren't there
You're getting pretty good. Change back to the node_modules
directory.
- Use the same
cd
command as the last lesson - You can press the up arrow to cycle through previous commands
- Type
cd ..
into the terminal - Make sure you are in the
has
folder first - Enter
cd /workspace/project/freeCodeCamp/node_modules/has
to get to thehas
folder if you aren't there
You can go back two folders with cd ../..
. Each set of dots represents another folder level. Go back to the project
directory from the node_modules
directory.
- Be sure to go back two folders with one command
- Type
cd ../..
into the terminal from thenode_modules
folder - Make sure you go from
node_modules
toproject
- Enter
cd /workspace/project/freeCodeCamp/node_modules
to get to thenode_modules
folder if you aren't there
You are back in the project
folder where you started. List what's in here again.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there
That's right. Why don't you get a fresh start by clearing the terminal.
- Use the "clear" command
- Enter
clear
into the terminal
You will be making a website boilerplate. You can make a new folder with mkdir <folder_name>
. mkdir
stands for "make directory". Make a website
directory in this project
folder. Remember that "directory" and "folder" mean the same thing.
- Enter
mkdir website
into the terminal - Make sure to make it in the
project
folder - Don't try to create it with a different method
- Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there
List what's here to make sure it got created.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It worked. The website files will be in the new directory. Change to the website
directory so you can start creating them.
- Use the "change directory" command
- Enter
cd website
into the terminal - Enter the command from the
project
folder - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the website
folder.
- Use the "list" command
- Enter
ls
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It's brand new, there's nothing in it yet. The echo
command lets you print anything to the terminal. You used it in the first lesson. Just type what you want to print after it. Use it to print hello website
to the terminal.
- Here's an example:
echo <text_here>
- Capitalization matters
- Enter
echo hello website
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Websites usually have an index.html
file. You can use touch <filename>
to create a new file. Create index.html
in the website
folder.
- Be sure to include the filename and extension
- Don't try to create the file with another method
- Capitalization matters
- Enter
touch index.html
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
They usually have a CSS file as well. Create styles.css
in the website
folder using the same method.
- Use the "touch" command
- Here's an example:
touch <filename>
- Don't try to create the file with another method
- Enter
touch styles.css
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the website
folder to make sure they got created.
- Use the
list
command - Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There they are. Next is a JavaScript file. Create index.js
in the website
folder with the method you have been using.
- Use the "touch" command
- Here's an example:
touch <filename>
- Don't try to create the file with another method
- Enter
touch index.js
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You might turn this into a git repository. Create .gitignore
in the website
folder with the same method.
- Use the "touch" command
- Here's an example:
touch <filename>
- Don't try to create the file with another method
- Enter
touch .gitignore
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the website
folder to see your new files.
- Use the
list
command - Make sure you are in the
website
folder - Enter
ls
in the terminal - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's three files, but where's the .gitignore
file? I think it's hidden. Most commands have a --help
flag to show what the command can do. Display the "help" menu for the ls
command. Here's an example: command <flag>
- Use the
list
command with the "help" flag - You previously used:
ls -l
- Enter
ls --help
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Scroll through the menu to see the flags that go with ls
. The flag you are looking for is --all
, or -a
for short. List all the contents of the website
folder using the correct flag.
- Use the
list
command with the "all" flag - Here's an exmple:
command <flag>
- Enter
ls -a
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's the hidden file. Do you see it? It didn't display before. It also includes .
and ..
. You used cd ..
to go back a folder earlier. Change to the .
directory.
- Use the "change directory" command
- Enter
cd .
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You didn't go anywhere. The .
takes you to the folder you are in, and ..
takes you back, or up, a folder. Websites need some images. Create background.jpg
in the website
folder.
- Use the "touch" command
- Here's an example:
touch <filename>
- Don't try to create the file with another method
- Enter
touch background.jpg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Next, add a header image. Create header.png
in the website
folder.
- Use the "touch" command
- Here's an example:
touch <filename>
- Don't try to create the file with another method
- Enter
touch header.png
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Finally, create footer.jpeg
in the website
folder.
- Use the "touch" command
- Here's an example:
touch <filename>
- Don't try to create the file with another method
- Enter
touch footer.jpeg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use the list command to check out the images you just added.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Looks like images show up in pink. There's also three fonts to use for the website. The first one is "roboto". Create roboto.font
in the website
folder.
- Use the "touch" command
- Don't try to create the file with another method
- Enter
touch roboto.font
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
The next one is "lato". Create lato.font
in the website
folder.
- Use the "touch" command
- Don't try to create the file with another method
- Enter
touch lato.font
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Lastly, create menlo.font
in the website
folder.
- Use the "touch" command
- Don't try to create the file with another method
- Enter
touch menlo.font
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of this folder to see your new font files.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Your three font files are there. There's three icons for the website as well. Create CodeAlly.svg
in the website
folder.
- Capitalization matters
- Use the "touch" command
- Don't try to create the file with another method
- Enter
touch CodeAlly.svg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Next, create CodeRoad.svg
in the website
folder.
- Capitalization matters
- Use the "touch" command
- Don't try to create the file with another method
- Enter
touch CodeRoad.svg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Finally, create freeCodeCamp.svg
in the website
folder.
- Capitalization matters
- Use the "touch" command
- Don't try to create the file with another method
- Enter
touch freeCodeCamp.svg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Check out the new icons you just added by listing the contents of the folder they are in.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
The icons are pink as well. I think the images should go in a separate folder to clean it up a little. Make an images
directory in the website
folder to put them in.
- Use the "make directory" command
- It's the
mkdir
command - Add the folder name after the command
- Here's an example:
mkdir <folder_name>
- Enter
mkdir images
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the website
folder to make sure your new folder is there.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's your new images
folder. It's blue. You can copy a file with cp <file> <destination>
. cp
stands for "copy". Copy background.jpg
to your images
folder.
- Enter
cp background.jpg images
into the terminal - Don't try to use a different method to copy it
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Better make sure it worked. Change to the images
directory.
- Use the "change directory" command
- Enter
cd images
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents to see if background.jpg
is here.
- Use the "list" command
- Make sure you are in the
images
folder - Enter
ls
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There it is. Looks like the copy worked. Change back to the website
directory so you can copy the other ones.
- Use the "change directory" command
- Add
..
to the command to go back a folder - Enter
cd ..
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Remind yourself of the files here by listing the contents.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You copied the background image to the images
folder so you don't need the one here anymore. You can remove a file with rm <filename>
. Remove background.jpg
from the website
folder.
- Enter
rm background.jpg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents to make sure it's gone.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Okay, it's gone. Next, copy header.png
to the images
folder.
- Here's the example again:
cp <file> <destination>
- You previously used
cp background.jpg images
- Don't try to use a different method to copy it
- Enter
cp header.png images
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Last, copy the "footer" image to the images
folder.
- Here's the example again:
cp <file> <destination>
- You previously used
cp header.png images
- Don't try to use a different method to copy it
- Enter
cp footer.jpeg images
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
All the images should be copied over. Change to the images
directory so you can make sure.
- Use the "change directory" command
- Add the path of where you want to go to the command
- Enter
cd images
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Check if the images are here by listing the contents.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
They all made it here. Go back to the website
folder so you can delete the original files.
- Use the "change directory" command
- Add
..
to the command to go back a folder - Enter
cd ..
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents to remind yourself of the filenames to delete.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's two that you don't need anymore. Remove the "header" image file from the website
folder since you copied to the images folder.
- Use the "remove" command
- Here's an example:
rm <filename>
- You previously used
rm background.jpg
- It's the
header.png
file - Enter
rm header.png
in the terminal - Don't try to use a different method to delete the file
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It should be gone. Remove the "footer" image from the website
folder as well.
- Use the "remove" command
- You previously used
rm header.png
- The file to remove is
footer.jpg
- Don't try to use a different method to delete the file
- Enter
rm footer.jpeg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the website
folder to check if they are gone.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Looks like they're all deleted. There was a mistake with the extensions for the font files. You can rename them with mv
like this: mv <filename> <new_filename>
. mv
stands for "move", it can rename or move something. Rename roboto.font
to roboto.woff
.
- Enter
mv roboto.font roboto.woff
- Don't try to rename it with other methods
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use "list" to check if it worked.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Do you see the "roboto" font? The rename worked. Next, rename the "lato" font file to lato.ttf
.
- Use the "move" command to rename a file
- Here's the example:
mv <filename> <new_filename>
- You previously used:
mv roboto.font roboto.woff
- It's the
lato.font
file - Don't try to rename it with other methods
- Enter
mv lato.font lato.ttf
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Lastly, rename the "menlo" font to menlo.otf
.
- Use the "move" command to rename a file
- Here's the example:
mv <filename> <new_filename>
- You previously used:
mv lato.font lato.ttf
- It's the
menlo.font
file - Don't try to rename it with other methods
- Enter
mv menlo.font menlo.otf
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use the "list" command to make sure those last two got renamed.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Take a look at the files to make sure they got renamed. Those font files could be organized into a folder as well. Make a fonts
directory in the website
folder to put them in.
- Use the "make directory" command
- It's the
mkdir
command - Here's an example:
mkdir <directory_name>
- Don't try to create the folder with another method
- Enter
mkdir fonts
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the website
folder to make sure your new folder is there.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
See it? You renamed the font files with mv
, you can also move files with it. Move the "roboto" font to the new fonts
folder. Here's an example: mv <file> <destination>
.
- Use the "move" command
- The file to move is
roboto.woff
- Don't try to move the file with another method
- Enter
mv roboto.woff fonts
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You can use find
to find things or view a file tree. Enter find
to view the file tree of the website
folder to see all the files and folders within it.
- Use the "find" command
- Make sure you are in the
website
folder - Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You can see everything in this website
folder and its descendant folders. Notice that they all start with ./
to represent this folder. You can see that your font moved to the fonts
folder. Next, move the "lato" font to the fonts
folder.
- Use the "move" command
- Here's an example:
mv <file> <destination>
- The file to move is
lato.ttf
- You previously used:
mv roboto.woff fonts
- Don't try to move the file with another method
- Enter
mv lato.ttf fonts
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's one more font to move. Move the "menlo" font to the fonts
folder.
- Use the "move" command
- Here's an example:
mv <file> <destination>
- The file to move is
menlo.otf
- You previously used:
mv lato.ttf fonts
- Don't try to move the file with another method
- Enter
mv menlo.otf fonts
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use find
again to list the whole file tree and make sure those two got moved.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Yes, you can see them all in the fonts
folder. Let's organize some more. Make a client
directory in the website
folder for the client side files.
- Use the "make directory" command
- Here's an example:
mkdir <directory_name>
- Enter
mkdir client
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You can make a folder in that client
folder from here by adding it to the path like this: mkdir client/<new_folder_name>
. Make a src
directory in the client
folder from here.
- Use the "make directory" command
- Enter
mkdir client/src
from thewebsite
folder - Don't try to create the folder with another method
- Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You can move files all the way across the system from here with the right path. Move index.html
to the client/src
folder from here.
- Use the "move" command
- You previously used:
mv menlo.otf fonts
- Enter
mv index.html client/src
from thewebsite
folder - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use find
to view the file tree and make sure it moved.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Can you see the index.html
file in your new src
folder? Looks like it moved 😄 There's some more files that can go in the src
folder. Move index.js
to it from here.
- Use the "move" command
- You previously used:
mv index.html client/src
- Enter
mv index.js client/src
from thewebsite
folder - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Last is the CSS file. Move styles.css
to the src
folder.
- Use the "move" command
- Don't try to move the file with another method
- You've used
mv index.js client/src
to move a file - Enter
mv styles.css client/src
from thewebsite
folder - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Seems like you can do anything right from here. Take another look at the tree with find
.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Things are looking more organized 😄 You can use find <folder_name>
to display the tree of a different folder. View the file tree of the client
folder from the website
folder.
- Use the "find" command
- Add
client
at the end of the command - Enter
find client
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Now you just see what's in the client
folder. What else can find
do? View the "help" menu of the find
command to look around.
- Use the "find" command with the "help" flag
- The help flag is:
--help
- You previously used
ls --help
- Enter
find --help
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
The menu isn't very pretty, but there's a -name
flag in there. You can use it to search for something with find -name <filename>
. Use find
with the -name
flag to search for index.html
.
- Enter
find -name index.html
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It shows you where that file is. Using the same command, find where the styles.css
file is.
- Use the "find" command with the "name" flag and the filename
- The name flag is:
-name
- You previously used
find -name index.html
- Enter
find -name style.css
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You can search for folders with it, as well. Using the same command and flag, find the src
folder.
- Use the "find" command with the "name" flag
- The name flag is:
-name
- You previously used
find -name index.html
- Enter
find -name src
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
😄 View the file tree of the website
folder to see what else you need to do.
- Use the "find" command
- Don't use any flags this time
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
What's next? More organizing! You should put all the assets in one spot. Change into the client
folder.
- Use the "change directory" command
- Enter
cd client
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Make a new directory named assets
in the client
folder.
- Use the "make directory" command
- It's the
mkdir
command - Here's an example:
mkdir <directory_name>
- You previously used
mkdir client
- Enter
mkdir assets
in the terminal - Make sure you are in the
client
folder first - Enter
cd /workspace/project/website/client
to get to theclient
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Change into the new assets
folder.
- Use the "change directory" command
- It's the
cd
command - Enter
cd assets
in the terminal - Make sure you are in the
client
folder first - Enter
cd /workspace/project/website/client
to get to theclient
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
All the images and other assets can go here. Make an images
directory in the assets
folder for all the images.
- Use the "make directory" command
- It's the
mkdir
command - You previously used
mkdir assets
- Enter
mkdir images
in the terminal - Make sure you are in the
assets
folder first - Enter
cd /workspace/project/website/client/assets
to get to theassets
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Go to your new images
folder.
- Use the "change directory" command
- It's the
cd
command - Enter
cd images
in the terminal - Make sure you are in the
assets
folder first - Enter
cd /workspace/project/website/client/assets
to get to theassets
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You want the images here. Create background.jpg
in this folder.
- Use the "touch" command
- You previously used
touch freeCodeCamp.svg
- Enter
touch background.jpg
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/client/assets/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Wait. You don't need to recreate them. You can just move the other images here. Go back to the website
folder from here. It's three folder back.
- Use the "change directory" command
- You went back two folders with
cd ../..
- Enter
cd ../../..
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/client/assets/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Now go to where the original images are. Change into the images
folder.
- Use the "change directory" command
- Enter
cd images
in the terminal from thewebsite
folder - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the images
folder to see the files here.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Umm, first I think you should move them back to the website folder. Move header.png
back to the website
folder. The destination for the file is ..
- Use the "move" command
- Here's an example:
mv <file> <destination>
- Don't try to move the file with another method
- Enter
mv header.png ..
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the images
folder to see if it's gone.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It's gone. Go back to the website
folder.
- Use the "change directory" command
- Enter
cd ..
in the terminal from theimages
folder - Make sure you are in the
images
folder first - Enter
cd /workspace/project/website/images
to get to theimages
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List what's here.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's the file you just moved. Next, you will move it to the client/assets/images
folder. First, use find
with the correct flag to search for images
.
- Use the "find" command with the "name" flag
- The name flag is:
-name
- Here's an example
find -name <folder>
- You previously used
find -name src
- Enter
find -name images
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's your two image folders. Move header.png
to the one with the longer path. Just use it as the destination to do so.
- Use the "move" command
- Here's an example:
mv <file> <destination>
- The destination you want is
client/assets/images
- Don't try to move the file with another method
- Enter
mv header.png client/assets/images
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use find
to search for your header.png
file and make sure it moved.
- Don't forget the correct flag
- You want the "name" flag
- The name flag is:
-name
- You previously used
find -name images
- Enter
find -name header.png
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There it is. Right where you put it. Next, search for your footer.jpeg
file so you can move that over there.
- Use the "find" command with the "name" flag
- The name flag is:
-name
- You previously used
find -name header.png
- Enter
find -name footer.jpeg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It's in the original images
folder. You can use that path with the move command to move it. Move footer.jpeg
to the client/assets/images
folder while in the website
folder.
- Use the "move" command
- You previously used
mv header.png client/assets/images
- Make sure you put in the correct two paths
- The first path is
images/footer.jpeg
- The second path is
client/assets/images
- Enter
mv images/footer.jpeg client/assets/images
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
View the file tree of this folder to make sure all your images are over in their new folder. Don't use any flags.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You don't need the old images
folder anymore. You can use rmdir <directory_name>
to remove a folder. rmdir
stands for "remove directory". Try to remove the images
folder with rmdir
. Make sure it's the one in the website
folder.
- Enter
rmdir images
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Directory not empty? Oh yeah, there's still the background image in there. Remove the background image file in the images
folder from here. Make sure it's the one in the website/images
folder.
- Use the
rm
command - Here's an example:
rm <file_path>
- The file path you want is
images/background.jpg
- Enter
rm images/background.jpg
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Try to remove the images
folder again with rmdir
. Make sure it's the one in the website
folder.
- Use the "remove directory" command
- Enter
rmdir images
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
I think it worked this time. List the contents to find out.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
It worked, the images
folder is gone. Make a new icons
folder in your assets
folder while in the website
folder.
- Use the
mkdir
command - Your
assets
folder is in theclient
folder - Don't try to create the directory with another method
- Enter
mkdir client/assets/icons
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Move the CodeAlly.svg
file to your new icons
folder.
- Use the "move" command
- Here's a tip:
mv CodeAlly.svg <path_to_icons_folder>
- The destination path is
client/assets/icons
- Enter
mv CodeAlly.svg client/assets/icons
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
View the file tree of the website
folder and make sure it moved.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Verify that the file moved to the icons
folder. Next, move the "CodeRoad" file to your icons
folder.
- Use the "move" command
- The filename is
CodeRoad.svg
- Here's a tip:
mv CodeRoad.svg <path_to_icons_folder>
- Enter
mv CodeRoad.svg client/assets/icons
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Lastly, move the "freeCodeCamp" file to your icons
folder.
- Use the "move" command
- Here's a tip:
mv freeCodeCamp.svg <path_to_icons_folder>
- The path is
client/assets/icons
- Enter
mv freeCodeCamp.svg client/assets/icons
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
View the file tree and make sure the files moved.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
This looks much better. The three icons are now in the icons
folder. Make a fonts
folder in your assets
folder from here for all the font files.
- Use the
mkdir
command - Put the
fonts
folder in theclient/assets
folder - Enter
mkdir client/assets/fonts
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Turns out you want some different fonts for the website. From here, create roboto-bold.woff
in your new fonts
folder. You can put the path in front of the filename of where you want it to go.
- Use the "touch" command
- Here's an example:
touch <path/filename>
- The file needs to be created in the
client/assets/fonts
folder - Enter
touch client/assets/fonts/roboto-bold.woff
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Next, create roboto-light.woff
in your new fonts
folder from here.
- Use the "touch" command
- Here's an example:
touch <path/filename>
- Put the file in the
client/assets/fonts
folder - You previously used:
touch client/assets/fonts/roboto-bold.woff
- Enter
touch client/assets/fonts/roboto-light.woff
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
View the file tree of the client/assets/fonts
folder from here to see if your new files are there.
- Use the "find" command with the folder path you want to see
- Here's an example:
find <path_to_folder>
- Enter
find client/assets/fonts
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Two more fonts to go. Create lato-bold.ttf
in the new fonts
folder from here.
- Use the "touch" command
- Here's an example:
touch <path/filename>
- Put the file in the
client/assets/fonts
folder - You previously used:
touch client/assets/fonts/roboto-light.woff
- Enter
touch client/assets/fonts/lato-bold.ttf
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Lastly, create lato-light.ttf
in your new fonts
folder from here.
- Use the "touch" command
- Here's an example:
touch <path/filename>
- You previously used:
touch client/assets/fonts/lato-bold.ttf
- Enter
touch client/assets/fonts/lato-light.ttf
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
View your file tree and make sure the files are there.
- Use the "find" command
- Enter
find
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Things are looking more organized 😄 The new fonts are there. Now you can remove the old fonts
folder and everything in it. You can't do that with rmdir
since it's not empty. View the "help" menu of the rm
command to see if you can find anything.
- Use the "remove" command with the "help" flag
- The "help" flag is
--help
- Enter
rm --help
into the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
There's a -r
flag that says, remove directories and their contents recursively
. That will remove the folder and everything in it. Use the "remove" command with that flag to remove the fonts
folder. Make sure it's the one in the website
folder. Be careful not to remove the wrong folder.
- The "remove" command is
rm
- The flag you want is
-r
- Here's an example:
rm -r <folder>
- Enter
rm -r fonts
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there
List what's here to see if it's gone.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Looks like it’s gone. Surely, it went to the trash can right? No, it’s just gone. You should be very careful when recursively removing files like that. It will delete everything, and can destroy your operating system. There's a few more files for the boilerplate. Create package.json
in the website
folder.
- Use the "touch" command
- Enter
touch package.json
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Next, create server.js
in the website
folder.
- Use the "touch" command
- Enter
touch server.js
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Lastly, create README.md
in the website
folder.
- Use the "touch" command
- Capitalization matters
- Enter
touch README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the content of this folder to make sure your new files are there.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
The boilerplate is complete. Use echo
to print Yay!
to the terminal.
- Use the "echo" command
- Here's an example:
echo <text>
- Enter
echo Yay!
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Print I finished the boilerplate!
to the terminal.
- Use the "echo" command
- Enter
echo I finished the boilerplate!
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Print one more thing...
to the terminal
- Use the "echo" command
- Enter
echo one more thing...
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You can print to a file instead of the terminal with echo text >> filename
. Use it to print I made this boilerplate
to your README.md
file.
- Use the "echo" command
- Enter
echo I made this boilerplate >> README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use more
to view your README.md
file.
- Use the "more" command
- Enter
more README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Now that line is in the file. Add from the command line
to your README.md
file with the echo
command and the same method.
- Use the "echo" command with
>>
to add text to a file - Here's an example:
echo <text> >> <filename>
- You previously used:
echo I made this boilerplate >> README.md
- Enter
echo from the command line >> README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use more
to view the "readme" file again.
- Use the "more" command
- Enter
more README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Now the file has two lines. Add for the freeCodeCamp bash lessons
to your "readme" file with the echo
command like you did before.
- Use the "echo" command with
>>
to add text to a file - Here's an example:
echo <text> >> <filename>
- You previously used:
echo from the command line >> README.md
in the terminal - Enter
echo for the freeCodeCamp bash lessons >> README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
View your "readme" file again like you did before.
- Use the "more" command
- Enter
more README.md
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
😄 Change to the project
folder.
- Use the "change directory" command
- Enter
cd ..
in the terminal - Make sure you are in the
website
folder first - Enter
cd /workspace/project/website
to get to thewebsite
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
You are back where you started. List what's here.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Still the same items. Rename the website
folder to website-boilerplate
.
- Use the "move" command
- You previously used:
mv menlo.font menlo.otf
to rename a file - Here's an example:
mv <folder_name> <new_folder_name>
- Enter
mv website website-boilerplate
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of this folder to see the new name.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Thanks for making this. You need to make a copy of it. Take a look at the "help" menu of the "copy" command.
- The "copy" command is
cp
- The "help" flag is
--help
- Enter
cp --help
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Scroll up to find that "recursive" flag. You need to use it again to copy the whole folder. Copy the whole boilerplate into a folder named toms-website
.
- The "copy" command is
cp
- The "recursive" flag is
-r
- Here's an example:
cp -r <folder_to_copy> <name_of_copy>
- Enter
cp -r website-boilerplate toms-website
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
List the contents of the project
folder to see the new copy.
- Use the "list" command
- Enter
ls
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Thanks. Use find
to view the tree of toms-website
.
- Use the "find" command
- Add the folder name to the command
- Here's an example:
find <folder_name>
- It's the
toms-website
folder - Enter
find toms-website
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Use find
to view the tree of the boilerplate folder to make sure it matches.
- Use the "find" command
- Add the folder name to the command
- It's the
website-boilerplate
folder - Enter
find website-boilerplate
in the terminal - Make sure you are in the
project
folder first - Enter
cd /workspace/project
to get to theproject
folder if you aren't there - If you used the reset button, you may need to enter the above command to get to the correct folder even if it looks like you're already there
Awesome! You are finished for now. Clear the terminal one last time.
- Use the "clear" command
- Enter
clear
into the terminal
Print "goodbye terminal" to the terminal.
- Use the "echo" command
- Here's an example:
echo <text>
- Enter
echo goodbye terminal
into the terminal
Use the "exit" command to exit the terminal.
- Enter
exit
into the terminal - Have a nice day