JavaRanch Home    
 
This page:         last edited 30 May 2010         What's Changed?         Edit

Linux Unix   

This page is the FAQ for the JavaRanch Linux/Unix forum. It's editable by everyone, so add your own content as you see fit.



  What is Unix?

Unix is a computer operating system developed in the 1960's and 70's by Bell Labs (AT+T). The trademark is currently owned by The Open Group. You can find out more about Unix here. Popular Unix-like operating systems include IBM AIX, BSD, HP-UX, Linux, Solaris and Mac OS X



  What is Linux?

Linux is a Unix-like operating system kernel created by Linus Torvalds, who owns the trademark on the name "Linux" and oversees development of the kernel. The kernel is bundled with other software to create what is called a "Linux distribution".



  What is a Linux Distribution?

A Linux distribution is the Linux kernel packaged with other system and application software to make a full-featured operating system. Some Linux distributions are small and fill a very specific niche, such as the Smoothwall firewall. Others are general-purpose operating systems with office and software development tools, for example, the currently very popular Ubuntu distribution.

The differences between Linux distributions are usually rooted in the philosophy of the company, team or individual that created the distribution. Some distributions, like Ubuntu are intended for general-purpose desktops as well as ease-of-use. Fedora on the other hand, aims to incorporate the latest versions of software. Debian aims for stability and trail a distribution like Fedora by several versions (and bugs!).



  How do I install Linux?

Linux can be installed as the sole operating system on a computer. This is the simplest solution and one should consult their selected distribution documentation for the instructions as the installation process will vary between distributions.

Linux can also be installed alongside another operating system, for example, Windows. This is called a "dual-boot" configuration. A boot manager displays the choices for operating system when the computer is starting up and one can choose the OS at that time. To switch operating system, simply reboot and choose the other operating system from the boot manager. Here is a tutorial that illustrates what is involved in dual booting. Again, consult the documentation provided with one's distribution as there may be applications to streamline this process provided.

Many distributions provide a Live CD which is a bootable CD or DVD that one can use to boot into a Linux OS without actually installing it on a hard drive. Knoppix is one popular distribution that has a bootable CD. It is full-featured, including office software and numerous programming languages and utilities. I have rescued data from numerous crashed Windows computers using Knoppix and highly recommend it. Ubuntu and Gentoo among others provide a Live CD which can be used to install the OS on a hard drive. There are many others, often with specific purposes like desktop replacement, system rescue, media playback, clustering and so on.

One disadvantage to a Live CD install is that one cannot save changes or documents. Another option is to put the Live CD image on a USB flash drive and make it "persistent", that is, create space on the flash drive to save changes. The Ubuntu Wiki has instructions and a tool to create such a drive. UNetbootin is another tool which can create persistent flash drive installs form many distributions. PenDriveLinux has instructions for several other distributions, as well as their own. These installs usually require a 1Gb or larger flash drive.

It is also possible to install Linux to a USB drive directly, though there are some steps one should take to optimize performance and insure the life of your flash memory (it can wear out!). This will require a larger flash drive than the previous option (Ubuntu installed weighs in at 2Gb+). There is a step-by-step guide to installing and configuring Ubuntu, but keep in mind they are for a particular class and not for the latest 9.04 release, so not all instructions will apply.

Another option for installing Linux is to use a virtualization product like VirtualBox or VMware Player. These products allow one OS to host another OS in a virtual environment.

VMWare provides a number of preconfigured virtual environments (what they term "appliances") including several Linux distributions and Solaris 10. If one requires a distribution that is not provided or would like to create a custom distribution, VMware offers a 30-day free free trial of VMware Workstation which can create and manage virtual machines. It is also possible to create a virtual machine without VMware Workstation using this online utility.



  What is The Best Linux Distribution?

Short answer: There Isn't One

Long answer: It depends on what you want to use your computer for. There may be a distribution tailored for exactly what you want. For example, if one wanted to install the Tivo-like Linux application MythTV but was intimidated by the prospect of discovering and installing the various prerequesites for the MythTV application, there is a distribution custom-built to support it: KnoppMyth. Conversely, KnoppMyth? would probably be a poor choice if one wanted to build a web server.

Here is a handy quiz to help you determine which distribution is for you. It asks questions about your hardware and needs and gives you a few options to consider.

That being said, here is a list of popular Linux Distributions for various purposes. It is by no means complete:

Desktop OS
Ubuntu Very popular distro because of simple set up and maintenance
Gentoo Has great package management, tweaker's delight, requires some knowledge and time to adminster
Fedora A popular distribution championed by RedHat?, bleeding-edge so be prepared for problems
openSUSE Solid, simple to administer desktop distro
Server OS
Red Hat Enterprise Server Fully supported enterprise OS (of course, support costs money, so RHEL can be expensive)
CentOS independent reconstitution of RHEL 4
Scientific Linux Another independent reconstitution of RHEL, this time by Fermilab, CERN and others (hence the name)
SUSE Enterprise 10 Fully supported distro from Novell
Utility Distros
Knoppix Bootable CD/DVD with complete desktop environment
Pendrive Linux Tutorials and tools to make a bootable flash drive - can be made persistent so one can save changes
Damn Small Linux (DSL) Very capable 50MB distro boots from business card CD or USB pen drive
System Rescue CD Bootable CD with all the tools for system rescue/recovery

For more distributions, information, links to reviews, news and so on, have a gander at Distrowatch.



  How do I learn Linux?

There's no shortage of information about Linux on the net. Every distribution will have a forum, mailing list, IRC channel or other conversational medium for users to help each other (see Ubuntu Forums for one example). These resources should be your first stop when you have a question about a particular distribution. They are also useful when selecting a distro, as knowledgable users will often engage in polite debate about a distro's suitability for a particular task.

For general Linux information, The Linux Documentation Project has numerous FAQ's, HOWTO's, guides and other information. Linux Journal is one of a number of Linux-related magazines that run both general interest and highly technical articles.

For the basics on how to use the command line, see Conquering the Bash Shell chapter of "Learning Debian GNU/Linux". The rest of the book is fairly dated, but that chapter is an excellent introduction to Bash. The shell is a very powerful tool in *nix, as opposed to the anemic command line in Windows and it is worth the time to learn some of the tricks of using it effectively. For more on shell programming, see Advanced Bash-Scripting Guide.



  How do I install Java?

First, check your distribution documentation. Many distributions include a Java VM or make one available through their package management system. In Ubuntu, for example, one must activate additional package repositories (the same steps are necessary to play MP3's and DVD's as that code is not "free"). Gentoo, for another example, provides a shell Portage package but it is necessary to actually download the Java distribution manually.

If all else fails, one can install Java manually by following the instructions in the JDK Release Notes

Note: If your Java applications perform poorly on Linux, check to see if your distribution installed the Gnu Compiler for Java as Ubuntu does with the java-gcj-compat package. In my experience, the gij interpreter included with GCJ performs very poorly compared to Sun's VM.

A non-Sun JVM is also available (Kaffe with GNU Classpath supplying the class libraries).

Apache Harmony is an open source JRE that claims to support more than 99% of the Java 5 APIs, and being able to run Apache Tomcat, Eclipse, Maven, Derby and Ant, amongst others.


  What is the cause of the "Can't connect to X11 window server" message?

The short answer is that the JVM needs to be run with the java.awt.headless=true property set.

The long answer is provided here.


  What makes Free Software "Free"?

As the GNU Project web site states: "Free software" is a matter of liberty, not price. . . Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software."


  Links to other useful information

CategoryFaq

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton