CLI Languages

In this modules we'll introduce Command Line Interface (CLI) languages often referred to as shell or terminal programming.

📚 Watch and Read

  1. Login to codecademy using your github account and click the orange START button on Codecademy's Learn the Command Line course.
  2. Complete the first 2 modules in this course:
    • Navigating the File System
    • Viewing and Changing the File System

Navigating the File System has 9 lessons which can be found by clicking the menu icon in the lower left hand corner of the codecademy screen. Codecademy Menu

In the Navigation module, you'll learn about the following commands:

  • pwd outputs the name of the current working directory.
  • ls lists all files and directories in the working directory.
  • cd switches you into the directory you specify.
  • mkdir creates a new directory in the working directory.
  • touch creates a new file inside the working directory.

After completing these 9 lessons click Next to move to the next module.

No upgrade necessary

Remember, you do not have to upgrade to codecademy pro.

In the Manipulation module, you'll learn about:

  • options that modify what ls and cp do
  • how wildcards allow you to select groups of files or directories

Play

Trying out CLI commands on your computer can be scary and potentially damaging to your computer. Use the Glitch terminal to play around with commands you learn without any risk to your computer.

Here's a video showing the steps below.

  1. Login to glitch.com using your github account and click the New Project button in the upper right

  2. Select hello-webpage from the dropdown

  3. Click Logs once your project has loaded and you see the Glitch editor

    Open the Glitch logs

  4. Click Console and drag the top of the logs pane up to make it bigger. I like to have mine on one half of the screen while the instructions I'm following on are the other half as shown below.

    Glitch console side by side

  5. Now you can play with any of the commands you learned on codecademy in the Glitch console. Your Glitch application is actually your own dedicated Linux server. Type uname -a in the console to see exactly what operating system you're on. You should see something similar to the output below.

    Linux 9f5c7ccb2b3c 4.4.0-1074-aws #84-Ubuntu SMP Thu Dec 6 08:57:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

  6. Type compgen -c into the Glitch console to see all the possible commands you can run on that machine.

  7. All the commands covered in codecademy this week are in that list, including ls. Type man ls to open the manual for the ls command.

    Manual for ls

  8. Hit the letter h on your keyboard to open the help for the manual. The manual and help are keyboard driven as are several other commands in the console. It is useful to know how to get around without getting frustrated.

  9. The first section of the help is on moving around. Hold j to scroll down the document. Hold k to scroll up.

  10. Hit f to move forward one window. Imagine the manual as a book, hitting f is like flipping forward one page. Hit b to flip back one page.

  11. Hit q to exit the help and get back to the manual. When you're finished reading the manual, hit q to exit the manual and go back to your regular console.

Extra Resources

💬 01 Chat

Due: 01/28/19 9 AM

Instructions

The purpose of this chat is to practice self-driven learning and collaboration skills, both of which are critical for sustained growth as careers in technical fields including cybersecurity change rapidly.

  1. Open the Glitch console and follow the Play instructions above.

  2. Select one of the commands listed in compgen -c that wasn't covered in the codecademy lesson and open the manual to learn what it does and how to use it.

    TIP

    The manual isn't always the easiest thing to understand, especially for new programmers. Some Google searching can often help understand what the command does and how to use it.

  3. Exit the manual for the command by hitting q.

  4. Use the command in the Glitch console.

  5. Take a screenshot that shows your use of the command and the output in the Glitch console.

    This post from Zapier covers how to take screenshots on most platforms.

  6. Find a website or other resource that explains why or how the command is used to solve a problem.

  7. Join the the #sp19-01-chat Slack channel and share what you've learned and done.

Grading Rubric

% Explanation
25% Using a new command not covered in the codecademy lesson.
25% Share the screenshot showing how you used the command in glitch during step 3.
25% Share the URL of the resources you found earlier in step 5.
25% Chat with your fellow students. Engage them on what you find interesting about their examples, get clarity on something you don't understand, offer help with others ask questions about your example.

You can always send me questions privately via email, txt, or Direct Message. But I encourage you to ask them in #q-and-a or in the channel for that assignment (like #sp19-01-chat) so that you and your fellow students can help each other out. Learning and programming are not solo sports!

📝 01 Journal

Due: 01/28/19 9 AM

The purpose of this journal is to review the concepts covered this week and reflect on how well you understand them.

Instructions

  1. Visit my codecademy profile and click the Badges button in the middle of the page

    my codecademy badges

  2. Copy the URL of your profile and paste it in a Direct Message (DM) to Michael Greene (profmikegreene)

  3. Also in a DM, write two lists.

    1. One for the things you understand most confidently
    2. One for the things you are struggling with.

The items in these lists can be vocabulary, assignment tasks, concepts, whatever sticks out in your mind. Try to find at least two items per list and feel free to make them as long as you like.

Grading Rubric

% Explanation
20% Direct message to profmikegreene containing the URL of your codecademy profile
40% Direct message to profmikegreene containing a list of things you are confident you understand
40% Direct message to profmikegreene containing a list of things you are struggling with

⚛️ 01 Project

Due: 01/28/19 9 AM

The purpose of this project is to prove your understanding of the concepts in this lesson.

Instructions

  1. Click Channels in the Slack sidebar to view all channels

  2. Find and join the sp19-01-project slack channel

  3. In that Slack channel, you will see a link that will take you to Github Classroom

  4. Click the Accept this assignment button and Github will create a version of the project for you.

  5. Once this step is complete, the page should say "Your assignment has been created here: https://github.com/RCC-ITP-175/sp19-01-". Click that link to move onto the next step.

    TIP

    You don't have to remember that link, you can always visit github.com and you should now see a repository in the list on the left that starts with RCC-ITP-175/sp19-01- and ends with your Github username.

    WARNING

    Reach out to the professor if you have issues getting to this stage. Do NOT Wait!!

  6. In your repository, there is a commands.sh file. Click to open it.

    Open commands.sh

  7. Click the pencil icon to edit the file.

    Edit commands.sh

  8. There are 13 questions for you to answer by typing the commands necessary to complete the requirements.

  9. Scroll down and you'll see a section called Commit changes to save your work. In the smaller textbox type, update commands.sh and select the Commit directly to the master branch option.

    TIP

    On github, a commit is like hitting a "save and upload" button. You can commit changes as many times as you like.

  10. When you are finished answering all the questions, Commit changes one last time.

Grading Rubric

pts Explanation
11 Completing the Github Classroom process and creating a sp19-01-project repository
39 Each of the 13 questions is worth 3 points.
Last Updated: 2/5/2019, 2:23:52 AM