The ENIAC Page

By Hunter Open Source Club


This page is dedicated to information about our school's UNIX workstations, collectively referred to as ENIAC. (NOTE: The name is kind of a misnomer, as technically ENIAC is only the gateway machine; the rest of the computers are named {cslab1, cslab2, ... cslab30}).

As Hunter students, we have the ability to remotely log in to these lab computers via ssh (or use them in person in the computer labs on the 10th floor). This is a great opportunity to explore the command-line and learn about UNIX. It's also lot of fun :).

Table of Contents

Key (Conventions Used In This Document)

ghost - Whenever a section of this guide is not self contained (i.e. we expect you to go to outside sources to learn something) you'll see this icon.

note - Signifies a side note or fun fact.

When you see something in angle brackets, e.g. <username>, interpret it as a placeholder for a value (in this case, your username). Square brackets, e.g. [username] are similar, but the value they denote is optional.

We precede lines on the command-line with the $ symbol -- it isn't part of the actual commands being demonstrated.

Historic note: what is an ENIAC?

ENIAC (Electronic Numerical Integrator and Computer) was the first programmable electronic, general-purpose digital computer, made in 1945.

Photo of the ENIAC

Our school system is named after this historic computer.

Historic note: what is a UNIX?

UNIX is an operating system created in the early 1970s at AT&T's Bell Laboratories.

When we say UNIX on this page, we are really referring to any system from the family of operating systems descending from UNIX, such as: Linux, MacOS, FreeBSD/OpenBSD/NetBSD, and so on. Yes, there are other systems besides Windows and MacOS :P; and yes, you are a UNIX user (you do have an iPhone or Android, right?).

The information on this page applies to the common command-line interface shared by UNIX-like systems. For more information on what exactly is in common between them, read about POSIX. This article may also be insightful.

If you are interested in further discussing the history of UNIX please email us. :).

UNIX || die

Conceptual note: what is the command-line?

Today we have two main sorts of interfaces through which we access our computer systems -- graphical and textual. Just as windows, menus, and the mouse cursor are the graphical means by which we orchestrate our computing environments, the command-line allows us to do so through text -- language instead of motions.

Some tasks are better done graphically, others textually. You'll see :P.

You may have heard these 3 terms: command-line, shell, and terminal. What exactly is the difference between them?

'Command-line' is a generic term referring to the sort of interface where you interact with your computer by typing commands.

DOS command-line

'Shell' refers to a kind of program that implements this command-line interface (and has UNIX-related connotations). For example: sh, bash, etc.

'Terminal' is a historical term. Computers were once very large, and one interacted with them via a terminal (and before that, a teletype/typewriter/TTY).

PDP-11 terminal VT100 terminal

What we refer to as a 'terminal' today is really a terminal emulator -- an application that emulates the visual look of the physical terminal you see in the image above.

For a more in depth explanation, see this great article. For a more sentimental piece, see In the Beginning was the Command Line by Neal Stephenson.

Connecting to ENIAC

You can connect to ENIAC via the ssh protocol. To do so, you need an ssh client. On UNIX-like systems you likely have an ssh client installed already, but for others you can download one from the Internet (e.g. PuTTY).

note Windows users: Note that WSL (Windows Subsystem for Linux) now exists; please set it up and partake in this journey with us. See Owen's guide on installing WSL. Also see Micro$oft's new open source terminal emulator.

The rest of this section assumes you're at a UNIX-like command-line. Here's what to do:

  1. Determine your username. It should be Firstname.LastnameXX, just like your Hunter email. For example: Ken.Thompson69. NOTE: The uppercase characters are important.
  2. ssh <username>@eniac.cs.hunter.cuny.edu. Replace <username> with the username you determined in step 1.
    • If this is your first time logging in, you might be greeted with something like: > The authenticity of host 'eniac.cs.hunter.cuny.edu' can't be established.
    • Just select 'yes' for whatever further questions you're asked.
  3. Enter your password (you won't see anything while typing it, don't worry).
  4. You're connected to ENIAC!

ENIAC is only the gateway machine though, and it's missing a lot of software that is present on the other cslab hosts. Before doing any work make sure to connect to a host of your choosing (cslab1...cslab30) by running ssh cslabN.

For further ENIAC related concerns see this page.

UNIX, From Soup to Nuts

Baby's First UNIX

Finally, you've made it :D!

The first thing you'll have to do is learn how to navigate the file system. Here are some specific things to figure out:

ghost Search online for help with this.

Go on a voyage around the system and see what you can find. Try to cd / and find your way back to your home folder. Find a folder that you cannot enter into (you'll see a permission denied error).

Other useful things to understand:

Here is an illustration of a hierarchical file system to help you picture what's going on:

hierarchical file system

Once you're comfortable with this you can start experimenting with other commands. It would be wise to learn how to use a command-line text editor, which we'll discuss in a later section.

note NOTE: you'll notice that your files are the same regardless of what cslab host you're logged into -- how could this be if you're logging in to a different computer each time? This is because the school computers are using NFS, a networked file system developed by Sun Microsystems.

UNIX Weapons School 01

UNIX Weapons School 02

UNIX Weapons School 03

Intermission: Shell Scripting

Today we have two main sorts of interfaces through which we access our computer systems-- graphical and textual. Just as windows, menus, and the mouse cursor are the graphical means by which we orchestrate our computing environments, the shell allows us to do so through text -- language instead of motions. Everyone's desktop is different -- we all have different backgrounds and document organization schemes. But the shell and the environment it interfaces with are even more deeply personal; almost every aspect can be configured, and many things can be automated. In the Unix shell you can arbitrarily extend the language you use to talk to your system -- each program or script you create is another word in your vocabulary! Have you ever read the book Frindle by Andrew Clements? A kid discovers that individuals get to determine what words mean, so he decides to make up a new word for 'pen' -- frindle. Words, languages are made up by people, and we are people too! Yet, in 'real life' we rarely exercise the power to extend language. Using and modifying the Unix shell will be your first step in escaping the myth of determinism, the idea that things are how they are because they have to be that way. Not true -- it's all been imagined up. Reject arbitrary rules that have been imposed on us. Reclaim your childhood innocence and be human.

UNIX Weapons School 04

Intermission: Terminal User Interfaces (TUIs)

Have you ever wondered how to print text in bold or a different color in your terminal?

You can do all sorts of crazy stuff, including this, using ANSI escape sequences. For example, run this in your shell:

# print a bold and underlined "Hello" in red
$ printf "\033[31;1;4mHello\033[0m\n"

Cool, right? Try to change the 31 after \033[ to other numbers like 32, see what happens. Also try to change the 4 in ;4m to a 3 or other numbers. Another thing you can do is clear your entire terminal window including all the previous output (try scrolling up afterwards, you'll see what I mean):

$ printf '\e[2J\e[3J'

All of these escape sequences can get annoying to type (and are not necessarily portable to different terminal emulators), so there are some alternatives. The tput utility is one. To print bold text with tput, you can run:

$ tput bold
$ echo hello world
$ tput sgr0 # reset

See also:

Communicating With The Others

UNIX is a time sharing system, we're all logged in to one big machine and sharing its resources. (The operating system is the arbiter of this process, by the way). Since we're all logged in, let's compute together!

Who exactly are we, by the way? Let's find out:

$ who
Yours.Truly47 pts/0         Feb 5 11:28
Ken.Thompson69 :0           Feb 5 03:22 (:0)
Dennis.Ritchie93 :1         Feb 2 08:35 (:1)
Brian.Kernighan72 :2        Jan 31 20:17 (:2)

Heh, looks like some of the UNIX pioneers are logged into ENIAC, nice! (Just kidding, that would be super cool doe).

Let's send a message to Ken:

$ write Ken.Thompson69
is your refrigerator running?
oh crap, how do i close this 'write' thing
uhh...
oh yeah, I can send an EOF using CTRL-D

That whole message just got sent to Ken... oh well. The way the write program is structured, it keeps accepting input until you send it an EOF (end of file) character, which is done with CTRL-D (the control key + the d key). Ken will see our message on his screen and can respond in a similar way. Try it with your friends!

Some other programs worth checking out:

About Your Computer

Do you know what operating system your cslab host is running? Do you know how much hard drive space it has? How much RAM? Do you know how many CPUs it has? Do you want to know? Here are some commands you can use to find out:

Tranferring Files To and From ENIAC

Text Editors

Text editors are programs that do what they say on the tin (edit text). If you plan on writing programs or editing files, you'll need some sort of program to facilitate that.

It's important to note that programs are just text (source code), so you do not actually need an application meant specifically for programming in order to write programs (as long as your save your file as plain text and name it with the file extension your compiler expects, you could theoretically write programs in Micro$oft Word).

You may be wondering what the difference is between IDEs and text editors.

An IDE (integrated development environment) is an application for programmers that combines multiple components in one place -- a text editor, compiler, debugger, and so on. IDEs are usually built to be used with a specific programming language, though some support multiple. Some examples of IDEs are Eclipse, Xcode, Visual Studio, and JetBrains PyCharm.

A text editor in its simplest form is an application that lets you edit text. Some programming-oriented editors provide features that are useful for programmers, such as syntax-highlighting, auto-complete, and so on. Other editors are just there to edit text (e.g. Notepad). Text editors don't necessarily have to be graphical, they can be programs on the command-line. Some examples of text editors are Sublime Text, Atom, VS Code, Emacs, vim, Nano, and so on. (Note: at the risk of stating the obvious, text editors perform the generic function of editing text, and therefore are suitable to be used with any programming language).

Bonus: applications like Micro$oft Word and Google Docs are called 'Word Processors' -- they're like the IDEs of document preparation.

If you want to write programs remotely on ENIAC, you'll need to do so using a command-line text editor (actually this isn't strictly true -- later we will discuss something called X11 forwarding.). At first this may seem scary, but it is well worth the investment. Nano is a pretty accessible editor (originally writen for non-technical people to write emails in), so you may want to start there. Other available editors are vim and Emacs (they are very different and come from different cultural milieus; there is also an age-old holy war waging between vim and Emacs users). These editors have a steep learning curve but learning how to use one of them is well worth your time.

ghost icon - Teaching you how to use an editor is outside the scope of this document, please search that up on your own.

note - NOTE: if you're curious about vim, try running the vimtutor program on ENIAC.

Software on ENIAC

There is a lot of interesting software installed on ENIAC ready for us to explore. The following is a survey of some of that software, meant to encourage you to dig in further.

Programming Languages

A language that doesn't affect the way you think about programming, is not worth knowing. - Alan Perlis

There are actually a good bunch of programming languages (i.e. compilers/interpreters) available on ENIAC. In school we mostly learn about procedural programming and (faux) object-oriented programming, specifically with languages in the C family. Programming can look much different than that, it's of utmost important that you open your mind by exploring different paradigms of programming languages (e.g. functional programming, logic programming, etc). Also see the paper Notation as a Tool of Thought by Ken Iverson.

Here are some languages we have on our system:

We encourage you to take the course CSCI 460 - Advanced Programming Languages with professor Subash Shankar.

Editors

Version Control Systems

Build Systems

Utilities for Debugging and Reverse Engineering Programs

Image-Related

Sound-Related

Accessing The Internet

Viewing the Linux Source Code

Graphical Software on ENIAC and X11 Forwarding

Document Typesetting on UNIX

Appendix: Linux Distributions

Desktop Environments vs Windowing Systems

Further Reading