The following pages will give you a step by step introduction to using a terminal. While it refers to Linux, the same commands are available in macOS and Windows (with WSL). Read through these pages carefully. Don’t worry about trying this out on your own system yet, that will come very soon. For now, take notes on how commands are used, and which look similar to how you are used to using the GUI File Explorer/Finder.
1.What are four important features to look for in a text editor?
- code completion: allowing you to start typing and a display of suggestions for completing the code will be offered. This can save time, reduce typos, and is just overall nifty!
- syntax highlighting: making it easier to see the beginning/opening and ending/closing of elements, etc. and highlighting certain errors.
- variety of extension offerings: tools and accessories that assist you in your work, making things easier, more accurate, and add to overall functionality.
- variety of themes: these change your background and text colors and can help reduce eye strain and fatigue, and just generally esthetically please your brain. Yay!
2.What do the following commands do?
- pwd
This stands for "print working directory" and will show you where you currently are within the terminal. - ls
This stands for "list" and will display a listing of contents inside the current folder or file you are in. - cd
This stands for "change directory" and will take you back home when ran by itself, or direct you to a specific directory when followed by a location name (argument). - mkdir
This makes a new directory/folder. - touch
This makes a new file.
3.Can you explain what is happening in the following scenario if these commands and arguments are entered into the command line? (Arguments are extra instructions given to a command.)
- cd projects
This will change directory taking you to the "projects" folder. - mkdir new-project
This will create a new directory named "new-project". - touch new-project/newfile.md
This will create a new markdown file within the new-project folder named "newfile.md". - cd ..
This will change directory one level up along the hierarchy of the path you are currently at. - ls projects/new-project
This will list the contents within the "new-project" directory.