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.
- Click here to open the Starter Repl project.
- There, lick the "Fork Repl" button in the upper right
- A pop-up should appear: in the lower right, click the "Fork Repl" button
- In the new project, find the Tools section on the left
- There, click the Shell button:
- 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!
- Change the working directory to the SecretKeys folder
- Create a new text file in the directory called "Test.txt"
- Edit the text file and add a few lines to it
- Copy the file into another file called "Test2.txt"
- Create a new directory inside of SecretKeys called Files
- Move "Test2.txt" into the Files folder
- Delete the "Test.txt" file
- Print out the contents of the "Test2.txt" file
- Count how many lines and words are in the "Test2.txt" file
- Print out the full list of recently-used commands