Tags Linux
The EEE comes with Linux pre-installed. It's a customized distribution of Xandros, which itself is a fork of Debian - one of the most popular Linux distributions around. This is a good thing, because it means installing applications is very easy. APT (Advanced Packaging Tool) is the software used to manage "packages" in Debian. Packages are simply versioned, pre-compiled collections of programs and libraries, which APT knows how to install, update and uninstall. Really, the program installation process is much simpler on Linux than on Windows. No longer do you have to look around for programs to download, worry that new versions come out without your being informed, and fight "DLL hell" of library incompatibilities. APT takes care of it all for you. After adding links to the most common package repositories, you can just issue apt-cache search commands to look up software by keywords, and apt-get install to install packages. Usually the process of installing some program takes 20 seconds, from the moment you decide you need it and until it runs on your system. What follows is a collection of random insights I've had in the past few days of playing with the EEE Linux system. I did very little interaction with a Unix-y system in the past two years (In IBM, I worked on Linux and AIX for a few years) and forgot a lot of things. Some are coming back quickly, and some take more effort to re-learn.
  1. The standard Linux shell is bash. I'm more used to C-Shell from my past work on Unix, but bash is much more popular on Linux and is the de-facto standard shell. Besides, it's not much different from C-Shell, and seems to be more powerful. Some good resources to learn bash are here, here, and here. What's most important is that I re-learned all the goodies that can be performed with the command line (bash, like other popular shells, has integration with the readline library). !$ is my best friend ;-)
  2. Some utilities for managing disk space are important on the EEE which has so little real estate in terms of free space. df -h will report the total, used and available size on all the file systems mounted in your system. Another useful utility is du. In particular, du --max-depth=1 . will report the sizes of all directories under the current directory. The parameter given to max-depth can be played with to achieve more flexibility. In some cases, piping the result through sort can be useful. For example: du --max-depth=2 . | sort -g will print out the directories, sorted by their sizes, with the largest in the bottom (this is useful on a console).
  3. Nothing is perfect, however, and sometimes it isn't immediately obvious where an installation has placed its files (there's no problem with APT, but I had it when installing Perl modules from CPAN, as I willl tell later). This is similar to Windows. No reason to dispair, however - these files can be easily found. The mighty find command comes to the rescue here, with a plethora of options for searching by date. The simplest is find . -mtime 0, which lists all the files (-type d can be added to search only the directories) that were modified in the past 24 hours. man find will reveal a ton of other options - it all depends on what you need exactly. The power is there, all you have to do is unleash it.
  4. As any self-respecting Linux, the Xandros system on the EEE comes with Perl pre-installed (and Python, and Ruby). To save space, however, the Perl installation is pretty bare - almost no external module are installed by default. Initially, it was a surprise for me, as I'm used to the ActivePerl Windows installation which comes with a few dozens of commonly needed modules pre-installed. However, as it is Linux we're talking about, this presents no problem whatsoever. This is because on Linux, installing Perl modules from CPAN is a breeze, especially after the horrors of trying to do this on Windows. Just enter CPAN installation mode (perl -eshell -MCPAN), type install My::Package, and it works, including compilation with gcc. If you've never had the "pleasure" of installing complex modules on Windows, you can't really appreciate the relief I felt. A tiny gotcha is that you'll have to update the CPAN module bundle itself first, and this takes time, because it installs all the needed modules with their dependencies. An alternative is to use apt-get to install pre-compiled Perl module bundles from the Xandros/Debian repositories (a bit like installing ActiveState's PPMs on Windows). This will definitely be faster, because it doesn't require compiling and running built-in unit tests. For example, I've installed Tk this way. Running apt-cache search perl will give you more information than you can digest in a month. Also, don't forget to install modules as root (sudo perl -eshell -MCPAN). I've had the CPAN installer download many MBs of modules only to later find out that I had no permission to write them to the required locations. This created a situation of wasted disk space, which is very undesired on the EEE. So I've had to use some of the commands I listed in the previous sections to find and free this space.
  5. Last, but not least, I want to mention VNC. I've never worked with it before, and had no idea how simple it is to install and use. On the EEE I ran sudo apt-get install vnc4server, and on my home Windows PC I've downloaded the free RealVNC. All in all, I had VNC up and running in about 2 minutes, and now I can comfortably control my EEE from my home PC, with the large screen, comfortable keyboard and trackball. My home network is wireless, so this is very flexible, and completely removes the need for a docking station of any kind.