11 ms·
GameShell: A game to learn or teach the Unix shell
- bitwize 4y agoWhen I first started learning Unix -- way before Linux (I'm that old) -- there was a program called 'learn' that came with the OS. 'learn' taught you how to use the shell in a series of distinct lessons, each of which was capped off by an exercise in which you were dropped into a fake shell environment and instructed to achieve some task. Only by successfully completing the task (the program checked the state of the fake file system against the desired state) could you proceed to the next lesson. I'd been hoping for a program like 'learn' for modern environments. This looks like it comes close.
- marcodiego 4y agoInteresting! Never heard about it. Can you give some sources or more info?
- RALaBarge 4y agoGoogle is your friend https://www.unix.com/man-page/bsd/1/LEARN/ https://www.unix.com/man-page/bsd/1/LEARN/
- marcodiego 4y agoSure. I just couldn't think of a way to convince google to find the right answer. Anything like "on unix learn tool" or "unix learn command" wouldn't bring me it. What search did you use to find it on google?
- dudleypippin 4y agoI think the key would be knowing what flavor of Unix they were on. `bsd man learn` gets me to that page.
- lordgrenville 4y agoNot OP but I found this with "unix man learn" (without the quotes). It took a few tries though.
- Annatar 4y agoMaybe before starting to teach others, you should teach yourself how to cleanly package your software into OS packages, instead of peddling around MS-DOS style shell scripts with a .sh extension. Didn't anybody teach you that UNIX-like operating systems purposely do not use extensions, in order to abstract the implementation language of the executable from the user? How the hell are you going to properly teach others, if you have such knowledge gaps yourselves? It's blind leading the blind again; boy does this make me mad.
- arky527 4y agoI find the use of a 'sh' file suffix a useful convention to follow in helping identifying what is an isn't a shell script on my local machine
- Annatar 4y agoYou are not supposed to "identify" anything on UNIX-like operating systems; that is what the file(1) command is for, specifically, especially so since the entire concept of UNIX is that everything is a stream of bytes. Attempting to manually manage files in this way defeats the purpose of the OS abstracting it away for the user; and the users of your executable should not have to care what your executable is written in because you grew up on a PC-bucket whose operating system stems from CP/M -> MS-DOS!
- delta_p_delta_x 4y agoAs someone who did grow up on Windows and still uses it regularly alongside Linux, I want to respond to this comment just to play the Devil's advocate (i.e. infuriate you). > especially so since the entire concept of UNIX is that everything is a stream of bytes. I consider this an archaic, anachronistic, ancient, outdated, primitive (they all mean the same thing; I just used a thesaurus to really drive home my point) file model. While it made sense for the limited computers of the early 1970s, it is extremely hobbling today and the fact that no one really complains about it is... quite astounding. If every file is merely a bag of bytes, then every native program shall have its own file-parsing/byte-parsing routine. What a waste of effort, writing and rewriting parsers over and over again. The fact that one has to write a shell script that is interpreted, and itself calls not one, but three other binaries (cat, grep, awk) with arcane, not-easily-remembered flags just to extract out certain words in the last several lines of a file is... ridiculous. That you have to call 'file' instead of directly querying the OS or shell for file attributes is farcical. Consider PowerShell or Python as alternatives to shell scripting. In the former, the entire .NET library is available; in the latter, the default libraries may be imported as one sees fit, and additional libraries are available online. > defeats the purpose of the OS abstracting it away for the user The UNIX philosophy does a poor job of 'abstracting it away from the user'. For well-abstracted OSes, see any smartphone today (especially iPhones). Furthermore, not every UNIX/Linux user interacts with their computer solely over the command line; I use KDE Plasma, for instance. In general, when I see a file on Linux with no extension, I expect it to be a binary; I am surprised when it is, in fact, a shell script.
- kulikalov 4y agoI saw many games trying to teach programming, but never heard of any of them gaining significant popularity. I wonder why? I guess "play games instead of reading books" idea attracts audience with low motivation?
- deleted 4y ago[deleted]
- agentwiggles 4y ago> I guess "play games instead of reading books" idea attracts audience with low motivation? This seems a little uncharitable in its premise to me. I've never had all that much success learning from programming books, and the success I've had seemed to happen mostly when I would take the examples and run them and pull them apart and break them and fix them (etc, etc, etc). From the other side, well designed games are remarkable in their ability to teach concepts to a player (even if, in the general case, they're not concepts with applicability outside the game). It seems obvious to me that some kind of interactivity is really helpful in learning. Not too much of a stretch from there to guess that the best form of programming education might be some kind of game/book hybrid.
- curioussavage 4y agoHa, I never heard of any textbooks gain significant popularity either. I guess reading textbooks attracts audience with low motivation. In seriousness though why do you think any educational game would ever gain popularity anywhere close to popular video games.And what the popularity of the material even have to do with the motivation of its consumers???
- vultour 4y agoThere are (used to be?) widely recommended books for certain topics, such as K&R's "The C Programming Language". I don't think any programming games are anywhere near the popularity of these books.
- TulliusCicero 4y ago
- thesuperbigfrog 4y agoLooks like fun! Reminds me Terminal Quest: https://github.com/KanoComputing/terminal-quest https://github.com/KanoComputing/terminal-quest
- Akronymus 4y agoAlso, lists and lists, in terms of learning something via a text game. (cant check the actual link atm because work firewall) http://eblong.com/zarf/ftp/lists.tar.Z http://eblong.com/zarf/ftp/lists.tar.Z
- MikeTheGreat 4y agoI was hoping this would be a quick and easy way to help other people (students) get started. I got as far as: "Terminal Quest [...] linux-story is installed by default on Kano OS, and is provided as a debian package in our repositories. As it has a lot of dependencies from other packages in Kano OS, it is recommended you run it on Kano OS." I guess the use-case here is that an experienced person installs it for a newbie? I think I'm disappointed because I was hoping for something in a web page. Oh well :)
- thesuperbigfrog 4y agoIt works great on Kano which runs on Raspberry Pi. I have not tried installing it on Debian so I don't know how well it works in non-Kano environments.
- mninm 4y agoBack in the 90's I remember my family got a new Compaq (I think) PC. On it it came preloaded with this great dos tutorial that was essentially a fake terminal that would walk the user through DOS commands letting them try various things in a safe environment and let them see the effects. It was definitely effective in teaching my young self the basics of DOS and was a big step on my path to becoming proficient with a computer.
- Layke1123 4y agoIf you dont like running foreign code on your machine, you can run docker and then run foreign code on your machine. Did anyone else catch this in the article? Doesn't it seem like this makes it even more likely to get infected? No one understands Docker in entirety let alone this random game. It seems like all this stuff should just be automatically done behind the scenes and yet it's not.
- 3np 4y ago> It seems like all this stuff should just be automatically done behind the scenes and yet it's not. ...what stuff?
- Layke1123 4y agoWhatever Docker is doing that your browser/OS/hardware isn't. But that's the point. I have no idea what any of this stuff is actually doing. I'm just crossing my fingers that what I run isn't detrimental to my system. There's no actual understanding behind any of it anymore.
- lapinot 4y ago^ bot? Doesn't make any sense to me, OP link is not an article.
- lordgrenville 4y agoTheir first line is a quote from the README.
- lapinot 4y agoAh, ok. In any case I was TA with Pierre teaching that class at Chambéry this semester, to run the gamesaves from the student without being too worried about my files i just ran the thing inside a bubblewrap bash session: bwrap --dev /dev --ro-bind /usr/bin /usr/bin --ro-bind /usr/lib /usr/lib --symlink usr/bin /bin --symlink usr/lib /lib64 --unshare-user --uid 256 --gid 512 --bind TP2 /TP2 /usr/bin/bash
- avgcorrection 4y agoLearn? I would sooner forget.
- aronhegedus 4y agoI really liked https://overthewire.org/wargames/bandit/ https://overthewire.org/wargames/bandit/ when I was starting out! Basically 30 levels of capture the flag, starting with `ls -lrth`, then going up to scanning ports etc
- f0e4c2f7 4y agoWow this seems really cool especially as a teaching tool. Will take a look later, thanks for sharing.
- hothead334 4y agoAddictive. I'm been going for about 3 hours!
- mathieu_joly 4y agoI just made the first 10 missions on a Mac. It's all in French, which is not a big deal for me, and I confess it's pretty fun!
- mathieu_joly 4y agoIn a similar fashion and great for wannabes would be Hacknet, but unfortunately less challenging... https://store.steampowered.com/app/365450/Hacknet/ https://store.steampowered.com/app/365450/Hacknet/
- disintegore 4y agoOh, hey, I used that. During the OS 101 course at UQÀM. It was alright. Less of a game and more of a tool to wrap around learning exercises though.
- zokier 4y agoFor learning shell it would be neat for the inputs to be adversarial and unknown beforehand, so you learn to handle all the ugly edge cases properly.
- joyhumin 4y agothanks for sharing! this is really interesting!
- jazzabeanie 4y agoIs there an equivalent for powershell?
- joshward 4y agoPSKoans perhaps?
- afarviral 4y agoI really enjoyed "Oh my git!" (https://ohmygit.org https://ohmygit.org) and it upped my git-game a bit. I can see this being really good too.
- nebben64 4y agoFinally! I've be searching for a Git game!! Thanks