15, జులై 2014, మంగళవారం

Friending the Command Line


With touch-button apps, the Windows 8 Start screen, and the Mac Launchpad, there are an increasing number of GUI barriers that block users from interacting directly with their installed OS, making it more and more difficult to modify and automate tasks in both mobile devices and desktop machines. In fact, for many mobile devices, users have to root or jailbreak it in order to access the file system.

Matrix effect in Windows Command Prompt

This kind of access to computers you own should not really be privileged in the technological age, and I think it is therefore important for your students (and you!) to get friendly with the command line, the place where you can really get to know your computer and can have the most control over its actions.

Here are some fun things you can do on the Command Line to try to convince your students that it’s not so bad:

ASCII Star Wars through Telnet on Linux

On any GUI-based Linux system, you should be able to find your terminal by searching for “terminal” in your applications menu. On Ubuntu there is also a Ctrl+Alt+T shortcut to call it up.

From there, you can type

telnet towel.blinkenlights.nl

then “enter” right into the prompt and call up the text-based Star Wars to play right in your terminal window.


Star Wars ASCII version in my Ubuntu Terminal

You may need to install telnet into your machine, but it worked for me right away. You can also use the command in Mac and Windows command lines, but you may also need to install (for more info see the links for each OS below).

Here is a round-up of more fun things to do in your Linux terminal.
Here are more steps for getting comfortable with the terminal in Linux.

Retro Arcade Games on Mac

To find the terminal on your Mac (which uses all the same commands as the Linux terminal), you can either search for it through Spotlight – click on the magnifying glass on the top right corner of your screen (or use the command-space bar shortcut) – or find it in the “Utilities” folder, inside of the “Applications” folder.

Once you are there, type

emacs

then enter right into the terminal, then the escape key + x which calls up a menu.

From here, you can type one of the following

5×5
blackbox
dunnet
gomoku
hanoi
landmark
mpuz
pong
snake
solitaire
tetris

and begin playing the chosen game. The games do have graphics, but are a little laborious to play – but I am sure you will get some Mac street cred when you show this to your friends!

If you are having trouble, here are more detailed instructions.
And here are more fun things to do with the Mac terminal.
Remember you can use the Linux terminal commands in your Mac since it is based on a Linux shell.

Matrix Falling Code on Windows 

Open up Notepad and copy and paste the following code into a blank document:

@echo off
color 02
:tricks
echo %random%%random%%random%%random%%random%%random%%random%%random%
goto tricks

and save the file as matrix.bat into your home user file (this would probably be your name). Make sure there is no “.txt” extension in this file name.

To get to your Windows command line, click the Start Menu, then “All Progams,” then “Accessories.” On my Windows 7, it is called “Command Prompt” but on later versions it is called “PowerShell.” This should open into your home user file (showing your name on the left).

From here, just run the little script you wrote, by typing

matrix.bat

and enter. Your terminal should start going through numbers, as in the image above.

Here are more things you can do with Notepad and the Windows terminal.
Here is more fun with the Windows command line in general.

To further orient yourself with your command line, there are a lot of resources available online to peruse. You can start with this one from ACRL.



కామెంట్‌లు లేవు:

కామెంట్‌ను పోస్ట్ చేయండి