Using the Command Line in Replit

You can run a command line shell right from Replit!

Note that a Repl account is required to participate in this activity.

Getting Started with Replit

First, you'll want to get the a command line up and running.

  1. Click here to open the Starter Repl project.
  2. There, lick the "Fork Repl" button in the upper right
  3. A pop-up should appear: in the lower right, click the "Fork Repl" button
  4. In the new project, find the Tools section on the left
  5. There, click the Shell button:
  6. In the bash shell that opens, try entering a command (like ls):

Now you're ready to start commanding the mini Repl computer!

More Bash Commands

There are a ton of different bash commands to try - research them and see what they do! Some of them may require extra information to run, but some of them should run all on their own.

Basics

Fun Useless Stuff

  • sl
  • fortune
  • cmatrix
  • aafire
  • asciiquarium
  • yes
  • cowsay

Exercises

After researching the commands above, try to complete the following tasks using the command line. It should be possible to complete all of them without using a GUI. Note, some of these tasks will require commands not covered by this lesson. Use Google to figure out which commands are needed!

  1. Change the working directory to the SecretKeys folder
  2. Create a new text file in the directory called "Test.txt"
  3. Edit the text file and add a few lines to it
  4. Copy the file into another file called "Test2.txt"
  5. Create a new directory inside of SecretKeys called Files
  6. Move "Test2.txt" into the Files folder
  7. Delete the "Test.txt" file
  8. Print out the contents of the "Test2.txt" file
  9. Count how many lines and words are in the "Test2.txt" file
  10. Print out the full list of recently-used commands

results matching ""

    No results matching ""