Running Linux on a Laptop

A quick look at what to look for in a laptop for Linux and how to set it up.

You'll most likely want to have Ethernet support on your laptop. Modem detection and configuration is fairly straightforward on laptops (often completely automatic), since many have built-in modems that respond normally on the serial ports to which they're assigned. Also, most of the standard PCMCIA modem cards are easily supported, even if they are on combo cards with Ethernet adapters, such as the IBM Home & Away card.

Ethernet Configuration

For laptops which have on-board Ethernet (such as the Hitachi VisionBook Pro 7000 series), you use the same method as for a desktop machine to get TCP/IP networking up and running.

For PCMCIA Ethernet adapters, you will need to edit the PCMCIA network options file, probably /etc/pcmcia/network.opts. Editing /etc/rc.d/rc.inet1 or /etc/resolv.conf won't help, because the kernel Ethernet services won't be used.

The format of /etc/pcmcia/network.opts is straightforward; it contains the same sort of options as in /etc/rc.d/rc.inet1, as well as DNS_1 through DNS_3, for specifying domain name servers, and MOUNTS, for specifying NFS mounts which also must be listed in the /etc/fstab file. It also contains other options for configuring your Ethernet card in the event it is not automatically supported. (See Resources.)

Switching Between ISPs

If you are like me, you have an Ethernet network at home and at the other places you take your laptop (a friend's house, work, etc.). I've found that generally I have no need to use the laptop “in transit”. Since it is possible that I may not get around to plugging it into an AC adapter wherever I'm going, I don't need to keep the machine on while I'm switching from one network to another.

If this is also your situation, there is a simple solution. When switching networks, all that must be changed is either the /etc/rc.d/rc.inet1 and /etc/resolv.conf files, in the case of built-in Ethernet support in your laptop, or just /etc/pcmcia/network.opts if you are using a PCMCIA Ethernet card.

Listing 1.

Let's say you want to call the two locations (though there can be more) between which you want to transfer “home” and “away”. Rename the above-mentioned files to have extensions of .home and .away, for the configuration of each location respectively, then use a simple shell script such as the one shown in Listing 1 to point to the proper location. This script makes symbolic links for each configuration file, pointing to the corresponding location-specific file, if it exists. If it doesn't, it won't do anything, so nothing will break.

When you are ready to shut down your laptop for the journey, log in as root, run this program with a single command-line argument which is the location to which you are moving (e.g., away), then shut it down. When you start it back up, it will be configured for its new temporary home.

X Window System

Configuring X is fairly straightforward for laptops with supported hardware. The only place to be cautious here is making sure you have a laptop that supports Linux with the display hardware on the laptop (which is still somewhat proprietary, but far less so than when laptops first began coming out), has sufficient memory to run the X server, and runs the video mode and bit depth you need. The newer, high-end laptops often use the NeoMagic chip set, which is fully supported only in XFree86 3.3.2 and higher, so you may have to upgrade.

The best resource for determining whether a laptop will meet your needs is the Linux on Laptops web page (see Resources).

Erik Max Francis is a UNIX engineer who lives in San Jose, California. His main interests are programming, Linux, physics and mathematics. He has been using Linux exclusively at home since kernel version 1.2.8 and has been reading and contributing avidly to Usenet since 1989. He can be reached via e-mail at




Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Unfortunately linux on

elf's picture

Unfortunately linux on laptops is still painfull, speciallay when it comes about configuring the wireless card.
I have tried a couple of distros and with nowadays laptops, Kanotix was the most succesfull in automatic detection and configuration of devices.