Running Linux on a Laptop
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.
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.)
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.
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.
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 firstname.lastname@example.org.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Server Hardening
- May 2016 Issue of Linux Journal
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The Humble Hacker?
- The US Government and Open-Source Software
- The Death of RoboVM
- BitTorrent Inc.'s Sync
- Open-Source Project Secretly Funded by CIA
- New Container Image Standard Promises More Portable Apps
- ACI Worldwide's UP Retail Payments
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide