Transform Your PC into
a Workstation With Linux

Part 1: Introducing the Linux OS

One of the most exciting recent developments from the free software community, Linux has been attracting the attention of computer enthusiasts around the world. Originally the sole domain of hackers, computer scientists, and UNIX gurus, the latest version s of Linux are now robust enough for wide-spread use -- as evinced by the growing number of offices and laboratories that are installing Linux systems on their machines.

In the first of a two-part look at the Linux operating system, Computing Japan Associate Editor Steven Myers and TWICS' Craig Oda offer a general overview of the OS's capabilities and limitations and the status of Linux in Japan. Next month, they will
focus on the Japanese-handling abilities of Linux and introduce some of the contributions made by Japanese programmers to the growing
library of Linux software.

by Steve Myers and Craig Oda

Linux is a 32-bit clone of the UNIX operating system. It can be run on PCs with a 386 or higher CPU, in effect giving these machines the power of a UNIX workstation. What makes Linux (properly pronounced with a short "i," as in "win": lin' ucks) unique is that it is a free implementation of UNIX, cooperatively developed by volunteers worldwide.

The project was initiated in 1991 by Linus Torvalds of the University of Helsinki in Finland; it grew out of his interest in Minix, a small UNIX-like system that was used in the computer science curriculums of many universities to teach basic operating sy stem concepts. Torvalds began the Linux project to explore the capabilities of the 386 chip. He eventually posted a message to the Usenet newsgroup comp.os.minix describing his progress, and inviting others to help him in the effort to create a "better Mi nix than Minix."

A cooperative effort

As more and more programmers joined in the development effort, exchanging code over the Internet, a buggy (but nonetheless functional) kernel began to take shape. In January 1994, Linux 1.0 was released, and since that time the OS has continued to be impr oved by contributions from programmers across the globe. Kernel upgrades appear on the Internet almost weekly. Linux has been copyrighted under the terms of the GNU General Public License (GPL), which was written by the Free Software Foundation. The GPL l icense is designed to prevent people from restricting the distribution of the software, and it mandates that all source code and any modifications to the system be made freely available to the public -- a great help to programmers.

In Japan, a complete JE (Japanese Extension) distribution of Linux was available even before the 1994 general release of Linux 1.0. The JE remains the only major Linux distribution that has been localized in a language other than English, and it contains a great deal of software ported from BSD (another PC-based version of UNIX). Linux has proven immensely popular in Japan, with ports written not only for DOS/V, but also for FM-Towns and NEC PC98 machines, and Japanese programmers have made significant co ntributions to the ever-growing library of Linux software.

Linux features

Linux is a complete multitasking, multithreading version of UNIX that is capable of running X Windows, TCP/IP, Emacs, UUCP, mail and news software, and much more. A substantial amount of the free UNIX software available on the Internet can be compiled on Linux "as is" (i.e., without modification). All of the major utilities found on standard implementations of UNIX have been ported to Linux, including basic commands such as ls, more, chmod, sed, and so on. Many text editors (and their Japanese counterpart s) are also available for Linux, including pico, vi, and most variants of Emacs.

Linux, in short, provides a complete UNIX programming environment, and is ideal for developing UNIX applications. All of the standard libraries, programming tools, compilers, and debuggers can be found on Linux: Perl, Tcl/Tk, and gcc (an advanced C and C+ + compiler). One advantage is that, when using Linux, programmers have access not only to these libraries and tools, but also to the complete kernel and library source code.

Linux supports a version of X-Windows called XFree86, a port of X11R6 made freely distributable for PC-AT UNIX systems. Originally developed at the Massachusetts Institute of Technology, the X-Window System is the standard graphical interface for UNIX mac hines. The combination of Linux and X-Windows can transform an ordinary PC into a legitimate workstation. The XFree86 distribution provides its own programming libraries for developing X-Windows applications, and support is included for various widget set s, such as Athena, Open Look, and Xaw3D.

Several versions of Motif are also available for Linux, based on the official Open Software Foundation (OSF) sources. With Motif, Linux can be used to develop software that can be ported to most commercial UNIX platforms. Graphical UNIX systems, such as t hose made by HP and Sun, utilize a layered approach such as that shown in the figure above.

Japanese versions of Perl, Tcl/Tk, Emacs, and most UNIX tools are also available for Linux. Two of the most popular Japanese-capable text editors are mule and jvim. The pico editor (the default editor for the popular PINE mail reader) supports Japanese in put with the use of the kanji input programs wnn/umm. Although there is currently no Japanese word processor for Linux, high-quality Japanese documents can easily be produced using a Japanese version of Donald Knuth's TeX typesetting system.

The Linux philosophy

When installing and using Linux, it is important to always keep in mind that you are working with an operating system in which the entire kernel was developed from scratch -- containing no proprietary code whatsoever. As such, the developers of the system did not give extremely high priority to quality assurance. Thus, Linux is not as robust as, for example, a commercial version of UNIX -- nor was it ever intended to be.

Commercial systems are rigorously tested, and changes are made only according to the strict, systematic procedures of the development company. Linux, on the other hand, was designed with a completely different philosophy in mind. As Matt Welsh, author of several Linux "HOWTO" documents, puts it, "With Linux, you can throw out the entire concept of organized development, source control systems, structured bug reporting, or statistical analysis. Linux is, and more than likely always will be, a hacker's oper ating system."

One of the great merits and truly unique features of Linux, though, is that the system thereby offers opportunities for exploration and experimentation that simply cannot be found on other operating systems. Linux is ideal for those who are naturally curi ous and open-minded, and who have a desire to progress beyond a mere surface understanding of their systems. If you've mastered the basics of UNIX and are looking to delve deeper, or if you want to know more about kernel architectures, device drivers, net work protocols, and the like, then Linux may be for you. In addition, programmers can learn much about the technical aspects of creating Japanese UNIX and X-Windows applications by getting in and experimenting with the source code of existing programs.

Obtaining and installing Linux

Anonymous FTP -- One source of Linux distribution is the Internet via anonymous FTP. Your first step in obtaining Linux via anonymous FTP should be to download a document called "The Linux Installation HOWTO," which is available from ftp.sunsite
.unc.edu.

There are many distributions of Linux available, each with its own unique set of features and advantages. "The Linux Installation HOWTO" focuses on the Slackware distribution, which seems to be the easiest to install and the best supported and documented. All of the essential information required to get Linux up and running on your machine is included in this document. (Here, we will offer just a brief overview of the process, as well as a look at possible traps and pitfalls. Although the installation pro cedure for Linux is not overly difficult, there are a few points that might seem a bit odd from the viewpoint of users not so familiar with UNIX systems.)

The first files to download are those for creating the bootdisk image, which creates the Linux boot disk, and the rootdisk image, which will write to a floppy to create the Slackware installation disk. Both of these files have a .gz extension, meaning the y have been compressed by gzip, so you'll also need to download GZIP.EXE, an MS-DOS executable version of the gzip compression program. You will also need to get RAWRITE.EXE, an MS-DOS program that writes the contents of a file directly to a floppy, witho ut regard for the format. This program will be used to write the boot and root floppies. You will also need all of the files contained in the "a" disk set. (If you are downloading from an anonymous FTP site, these will be in subdirectories labeled a1, a2, a3, and a4. Copy the files from each directory onto its own floppy.)

You will use GZIP and RAWRITE to create your boot and root floppies. If you don't already have the necessary free partitions available for use, you will have to repartition your hard drive in order to make room for the Linux partition and a swap partition that Linux will use as a software cache. The steps for setting up your drive are outlined in detail in the HOWTO document.

Next, boot from the boot disk, login as root, and run the fdisk program under Linux for further partitioning. After this, all that remains is to run the SETUP program, which will walk you through the rest of the installation.

CD-ROM distribution -- Linux CD-ROM distributions are also fairly easy to come by, even in Japan. One of the most popular Linux CD-ROMs is the InfoMagic four CD-ROM set. (Media Palette in Akihabara carried the InfoMagic CD-ROMs at below US prices, but it recently shifted its focus to multimedia packages and has not offered new Linux CDs for some time.)

At the time of this writing (July 1995), Puratofomu in Akihabara was carrying the July 1995 release of Walnut Creek's 2.3 Slackware two CD-ROM set for ¥2,400. (Interestingly, this set is advertised in the July issue of the Linux Journal for $39.95.) Or, the package can be ordered directly from Walnut Creek (in California).

Although Walnut Creek markets the official Slackware version, the package does not contain the full snapshot of the tsx-11.mit.edu and sunsite.unc.edu FTP sites, something the InfoMagic CD-ROMs are noted for. (Puratofomu also carries the Red Hat CD-ROM di stribution for ¥1,800.)

Setting up X-Windows

To endow your PC with workstation-like capabilities, you'll need to install X-Windows as well. To set up X-Windows on Linux, you will first need to download and read the XFree86 HOWTO document from sunsite.unc.edu/pub
/Linux/HOWTO. Setting up X-Windows requires more caution than setting up just the base Linux system, because using the wrong X server can permanently damage your hardware.

You can get the binary distributions of XFree86 for Linux from tsx-11
.mit.edu:/pub/linux/packages/X11/XFree86-ver or sunsite.unc.edu:/pub/Linux
/X11/XFree86-ver (where "ver" is the version number of the XFree86 release you want to obtain -- e.g., XFree86-2.1). Be sure to read the README and INSTALL files in this directory first. It is also advisable to download the file X311bin
.tgz, which contains a program called SuperProbe. SuperProbe will examine your hardware and let you know which of the 11 different X-servers you should use.

The installation of X-Windows must be done as root (the details of root privileges will be clear after you install your base Linux system); there are binaries that use the setuid-root operation. The next step is to configure the server by creating the con figuration file XF86Config. Again, details for the configuration process are included in the README and INSTALL files. Finally, use the command startx to start the server and any clients.

Can it handle Japanese?

With its unique development history, open source code, and "hands on" philosophy, Linux has become the premier operating system for curious PC-AT users eager to obtain a deeper understanding of the inner workings of a 32-bit OS and its interactions with t he 80x86 chip. This article has introduced the basic capabilities of Linux and has provided some information about how to get Linux up and running on your machine. Next month, we will delve deeper into the topic of using Linux in Japan by examining the so ftware packages included with the Japanese Extension distribution and taking a close look at how Linux handles Japanese text processing.ç


Next month: Doing Japanese
on Linux


Craig Oda is a founding member of TLUG and avid Linux user (his home system consists of Ethernet-linked Linux machines with a serial Internet connection). He is employed by TWICS, Japan's first public-access Internet service provider, and can be reached a t craig@
twics.com.


Hardware requirements

For a base Linux system, you will need a computer with a 386 or higher CPU, ISA or EISA bus architecture, 2MB of RAM (4MB recommended), an AT-standard HDD controller, and 12MB of free hard disk space (more depending on number and size of applications). Fo r Linux with X-Windows, those requirements increase to a 486 or higher CPU, 8MB of RAM (16MB recommended), and at least 40MB of free hard disk space (100MB recommended).


Tokyo Linux User's Group


The Tokyo Linux User's Group (TLUG) is a non-profit, non-political users group whose members exchange information on the development and use of the Linux kernel and Free Software Foundation tools. Meetings (both physical and online) are held in English.

The idea for an English-language Linux user's group in Japan originated with Craig Oda and Nori Nishigaya in March 1994 at the HyperNetwork conference in Oita Prefecture, where both spoke about the Internet in Japan and about Linux kernel development, an outstanding example of the use of the Internet to coordinate a large software project.

In June 1994, Jim Tittsler, another Linux enthusiast, started the LINUX conference on TWICS (which, at the time, was the only commercial public-access Internet service available in Japan). The atmosphere was exciting and friendly; as one of the early memb ers remarks, "It felt as if we were all on the edge of this frontier, and that together we were taming this networked, high-tech jungle. It was great!"

The founding TLUG members were all pioneers in their professional careers as well. Nishigaya started the Japan office of Cyber Technologies International (CTI) in Tokyo shortly after the club was founded, while Oda stayed busy coping with a 20% per month growth rate at TWICS.


Rainer Mager, another founding member, started up the Japan Office for FORE Systems, a leading manufacturer of ATM (asynchronous transfer mode) switches.

The first offline meeting of TLUG was held in September 1994 at a Mexican restaurant in Shibuya. By December, the group had moved its meetings to the CTI office in Yotsuya, which is equipped with 64K-bps Internet access and six Linux machines. Summaries f rom past meetings can be found on the TLUG home page. (See URL below.) Meeting times and dates are also announced on the homepage and through the TLUG mailing list.

TLUG welcomes new members; there is no membership fee. For information, contact any of the following:

Craig Oda: craig@twics.com

Nori Nishigaya: anishi@cyber.ad.jp

Rainer Mager: rvm@fore.com

To subscribe to the TLUG mailing list, send an e-mail message to majordomo@lists.twics.com. Include the command "subscribe tlug" in the body of the message. If you encounter problems with the mailing list, send a message to listmaster@lists.twics.com.

The TLUG BBS can be reached by pointing your WWW browser at http://metanoia.cyber.ad.jp/tlug-bbs.html. And the TLUG home page can be accessed at http://www.twics.com/~craig/tlug.html.


Linux sources

For Linux binaries and HOWTO files, use anonymous FTP to download from tsx-11
.mit.edu or sunsite.unc.edu.

Linux CD-ROMs can be purchased in Tokyo at Media Palette (6th floor of the Soto-Kanda Building in Soto-Kanda; phone 03-3255-3036, fax 03-3255-6360) or Puratofomu (4th floor of the Mitsuwa Building in Kanda; phone 03-3251-7611, fax 03-3255-9506). The offic ial Slackware Linux 2.3 CD-ROM set (as well as Plug and Play Linux, the Linux Bible, TeX, X11R6, and other UNIX-related sets) can also be mail ordered from Walnut Creek CD-ROM of Concord, California (phone +1-510-674-0783, fax 1-510-674-0821).

For Internet mail order of Linux packages, check out the following sites:

InfoMagic

http://www.infomagic.com/infomagic/index.html

Morse Telecommunications, Inc.

http://www.morse.net

Red Hat Software

http://www.redhat.com

Walnut Creek CDROM

http://www.cdrom.com/

(or send e-mail to) orders@cdrom.com

Yggdrasil Computing, Inc.

http://www.yggdrasil.com


The Linux Journal is the only monthly magazine devoted to the Linux OS and Linux applications. A one-year subscription is $24 within the US and Canada, $29 elsewhere. For information, contact the Seattle-based Linux Journal at +1-206-782-7733, fax
+1-206-782-7191.