First steps with the command line (BASH level 0)
GameShell
This sessions practical is purely based on GameShell, a “game” developed by Pierre Hyvernat, Rodolphe Lepigre and colleagues to teach the Unix shell.
GameShell has different missions in which you will discover the basic commands to get by in a Unix shell. Of which:
- the basics:
cd
,ls
,mkdir
,mv
,rm
,cp
- file manipulation & organisation commands
- pipes & redirections
- processes & permissions
Our objective is to manage the first 12 levels within this session but the further you go, the better!
Setup
Step 1: Download the GameShell executable
Click on the following link to download the script: https://github.com/phyver/GameShell/releases/download/v0.5.1/gameshell.sh
Step 2: Connect to the IFB’s Open OnDemand interface
Click on the following link and fill in your IFB login information: https://ondemand.cluster.france-bioinformatique.fr/
Step 3: Set up your working folder
Click on the “Files” menu > “Home Directory”. In the Files Browser, create a new directory in your Documents folder (click on “Documents”, then click on “New Directory”). Then upload to it the gameshell file that you’ve downloaded in step 1 (click on your new directory, then on “Upload” and fetch the gameshell.sh
file).
Step 4: Open a Desktop session
Click on “My interactive sessions” in the menu bar, then on “Desktop: Core”. Fill in the form to reserve the appropriate resources on the IFB-core cluster and click on “Launch”.
After a little while, you should have something like the menu below. Click on “Launch Desktop: Core”.
This will open a new tab in your web browser: the remote desktop you’ll be working on.
Step 5: Start GameShell
In your remote desktop, double click on the “Home icon” and move to the folder where you’ve saved the gameshell.sh
script. Right click on the white space next to your file and click on “Open Terminal Here”.
This will open a terminal (black window), in which you just have to type one of the following to launch GameShell in French (fr), English (en) or Italian (it):
bash gameshell.sh -L fr
bash gameshell.sh -L en
bash gameshell.sh -L it
At the end of the session:
- Save your progress for when you’d like to replay GameShell on a different computer/server: go to “Files” in the top menu to download the
gameshell-save.sh
file - Close the remote desktop by closing the tab and click on “Delete” on the “My interactive sessions” tab to free the resources you’ve reserved (this won’t delete your files).
- To continue playing at home, see below.
Troubleshooting, tips & useful references
Connection lost:
If you get disconnected from the remote desktop (TurboVNC), close the tab and open a new one from the “My interactive sessions” tab by clicking on “Launch Desktop: Core” again (it’ll reopen it exactly how you left it)
Cheat sheet for future reference:
This is a useful cheat sheet of basic Unix commands: https://files.fosswire.com/2007/08/fwunixref.pdf
Play at home?
GameShell works under Linux and Mac for sure (Windows coming soon?), or on the I2BC cluster (after the I2BC cluster training session).
If you have save your progress file gameshell-save.sh
, you can run it with:
bash gameshell-save.sh
To start a new session, download the executable then run it:
mkdir $HOME/GameShell
cd $HOME/GameShell
# for Linux systems:
wget "https://github.com/phyver/GameShell/releases/download/v0.5.1/gameshell.sh"
# for MacOS systems:
curl -L "https://github.com/phyver/GameShell/releases/download/latest/gameshell.sh" --output gameshell.sh
bash gameshell.sh