CLI Educational Game - Bashcrawl

Overview
Creative Commons License: CC-BY Questions:
  • How can I move around on my computer?

  • How can I see what files and directories I have?

  • How can I specify the location of a file or directory on my computer?

  • How can I create, copy, and delete files and directories?

  • How can I edit files?

Objectives:
  • Explore the bash dungeon and fight monsters

  • Reinforce the learning of CLI basics such as how to change directories, move around, find things, and symlinkings

Requirements:
Time estimation: 2 hours
Level: Intermediate Intermediate
Supporting Materials:
Published: Sep 30, 2021
Last modification: Oct 23, 2023
License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License. The GTN Framework is licensed under MIT
purl PURL: https://gxy.io/GTN:T00075
version Revision: 9
Best viewed in a Jupyter Notebook

This tutorial is best viewed in a Jupyter notebook! You can load this notebook one of the following ways

Launching the notebook in Jupyter in Galaxy

  1. Instructions to Launch JupyterLab
  2. Open a Terminal in JupyterLab with File -> New -> Terminal
  3. Run wget https://training.galaxyproject.org/training-material/topics/data-science/tutorials/cli-bashcrawl/data-science-cli-bashcrawl.ipynb
  4. Select the notebook that appears in the list of files on the left.

Downloading the notebook

  1. Right click one of these links: Jupyter Notebook (With Solutions), Jupyter Notebook (Without Solutions)
  2. Save Link As..

This is not a tutorial like most GTN content but a fun exercise for you to play around and learn a bit about the command line, and hopefully re-inforce the skills you covered in Basic and Advanced CLI skills.

Hands-on: Open a Jupyter Terminal

To best follow this tutorial, you should open a terminal.

Here are some instructions for how to do this on various environments.

Jupyter on UseGalaxy.* and MyBinder.org

  1. Use the File → New → Terminal menu to launch a terminal.

    screenshot of jupyterlab showing the File menu expanded to show new and terminal option.

  2. Disable “Simple” mode in the bottom left hand corner, if it activated.

    screenshot of jupyterlab showing a toggle labelled simple.

  3. Drag one of the terminal or notebook tabs to the side to have the training materials and terminal side-by-side

    screenshot of jupyterlab with notebook and terminal side-by-side.

CoCalc

  1. Use the Split View functionality of cocalc to split your view into two portions.

    screenshot of cocalc button to split views.

  2. Change the view of one panel to a terminal

    screenshot of cocalc swapping view port to that of a terminal.

Setup

git clone https://gitlab.com/slackermedia/bashcrawl
cd bashcrawl/entrance
# Run: cat scroll

Have fun, and good luck!