What is Inferno?
Inferno is a project by Lucent Technologies to create a system - independent operating system. The aims of Inferno include a common looking interface between hardware, a platform independent set of API’s, and a programming language that will work no matter where you take it. Inferno is the successor of Bell Lab’s Plan 9 operating system. Inferno is so loosely based on any thing previous that it can be run on almost any type of system available. These devices go from the set-top Network Computers to the Sony Play Station, to the ordinary computer.
The core of Inferno is portability. Almost all of the operating system is based on Limbo, the programming language of Inferno. When porting Inferno from one hardware to another all one has to do is to modify the few hardware dependent functions, and then immediately the entire system will work on the new system.
Many people see Inferno as a competitor to Java. Java in itself is a programming language that has many of the same functions as Limbo. Both are hardware independent and both are designed as large scale projects. But on the other had Inferno as a whole is an operating system, which in turns runs Limbo programs. There are plans in Lucent for the next version to let Java programs execute natively. This would mean that Java programs would be able to run on a system running Inferno as their operating system.
Installing and Running Inferno
To get a copy of Inferno you need to go to Lucent’s web sight at: http://inferno.lucent.com/inferno/registration.html and fill out the licensing agreement. After you have completed that you can choose which package you want to get. Be warned though, it is 16 megs without documentation. Unix users will need to download the main file system and then the executables while Windows 95 and Windows NT users can download the entire package (does not include documentation) in one big .exe file. Place the file you downloaded and un-compress it using whatever tool you need (.zip: pkunzip, .Z: compress, .gz: gzip). If you are performing a Win95/NT installation you must run the setup program to install the actual files. I suggest that you keep the defaults for the installation directory.
Once you have an actual installation/extraction complete you will need to start Emu. Emu is the command center for Inferno. It acts as the emulator for the system and also as a shell. To start Emu you need to run the command install_dir/operating_system/architecture/bin/emu or under Windows install_dir\Nt\386\bin\emu. Once you have gotten this started you will be greeted with the friendly Emu startup screen:
Inferno BETA.2 Build 16 main (pid=123) interp
Initialize Dis: /dis/sh.dis
bansod.edm.net$
Once you’ve seen this you know that Inferno has started up correctly. If we go throughout the lines they mean the following:
Inferno BETA.2 Build 16 main (pid=123) interp
Inferno, the Beta version, the 16th build, main program, process id 123, interpreted binaries
Initialize Dis: /dis/sh.dis
Starting the Dis virtual machine, and load the shell in
/dis/sh.disbansod.edm.net$
The command prompt, Inferno is ready to serve you
The commands to the Inferno shell are very Unix - like. It supports the standard cat, ls, cd, mkdir. In Build 16 networking is not started by default, so I suggest that each time that you startup the InfernoOS, that you execute:
bansod.edm.net$ bind -a '$I' /net
bansod.edm.net$ lib/cs
The first line binds the TCP/IP network stack the file system, and the second line initializes the communication stack. After you have started the network services you can use all the network functions in Inferno.
Once you have these service started you can play around with the networking package all you want. Now you probably want to get to the graphical interface to Inferno. All you need to do to start it is:
bansod.edm.net$ wm/logon
This starts the window manager and brings up the logon screen. For now enter the username 'inferno.' This will bring up the Inferno Window manager. The window manager (Wm) presents the system in a very Windows 95 like manner. The Inferno button is on the bottom left side of the screen, and all the programs that have been minimized will show up in the bottom task bar. Wm has some commands that it supports natively, such as the text editor, the task list, the shell window, and the remote and local windows.
Programs and Utilities
Inferno comes with a wealth of programs that make running Inferno much easier. Here is a brief list of commands supported by Inferno:
Table 1-1. Brief list of Inferno commands
|
Command |
Description |
|
ls |
lists the contents of a directory |
|
cp %SRC %DEST |
copy a file from src to dest |
|
cat %FILE |
shows the contents of file |
|
p ( or cat %FILE |p) |
shows a file in pages |
|
mv %SRC %DEST |
moves a file from the src to dest |
|
pwd |
print the current directory |
|
ps |
show what programs are running |
|
kill %PID |
kill a process with the ID of pid |
|
bind |
bind a resource to the file system |
|
grep |
extracts the line contain the text from the file specified |
The programs in Wm require a bit of special consideration:
The text editor is a very limited, but handy program that can be used to modify any file that exists, such as Limbo source. It includes the basic file open, file save, and search functions. The task list is useful for killing any process that have died on you. Be warned though, the task list does not refresh itself, so you must manually refresh. There is also the debug button which will open up the program in the Limbo debugger. The shell window is another handy program that will bring up a shell for Wm. It works identically to the command line shell. For X Windows users, it serves the same functionality as an xterm window.
The local and remote windows are used to browse the file systems of a computer. The local choice will browse your own computer; while the remote option will browse another computer on the network, provided that you have a username and password for that system. To connect to another computer you would type in
net!remote.computer.com. From there it will try to make a connection to the remote computer. If the connection is successful it will then ask you for your username, and your secret password.Inferno Conventions
Inferno is loosely based on Unix so if you have any Unix experience you can transfer it here. Inferno supports all the pipe and redirection commands such as:
|, >, >>, <, <<. These commands, especially the pipe command ( | ) can be useful for formatting text.Every resource that is on exists available to the operating system is represented as a file in the file system. Take for example starting the network. The network services were not available at system startup because the network devices were not bound to the file system. Once they were bound, the were available in
/net. Take a look and try this (without the quotes): "cat /net". If networking is started, then you should see a bunch of garbage fly by the screen. If you didn’t that means that the network is not bound to the file system.All Limbo files end with
".b". And all the program executables end with ".dis". This means that they have been compiled with the target being the Dis virtual machine. The source code to the command line programs is in the /appl directory and the actual executables are in the /dis directory.Closing and Ending Inferno
To close Inferno you need to go to the command window where it started up and hit Control-C. Currently there is no way to exit and there is no command for it. To exit Wm you need to close the Wm window and then issue:
"kill Wm". This will kill the Wm process and (hopefully) free all the resources it had occupiedHopefully this chapter will help you get going on Inferno. A lot of learning occurs by exploration. For fun try running
"mux/mux" to see a neat demo of a interactive TV. If you have any problems getting it to run, make sure that you have the directories (under you native operating system) to the default /usr/Inferno or \users\Inferno directories, and not something you chose. Inferno doesn’t like that.