Tuesday, March 31, 2009

Keystroke launching in Ubuntu with GnomeDo

A keystroke launcher is a program, hopefully a small one, that runs in the background and generally listens for a specific keystroke pattern. Once that keystroke pattern is detected, a graphical box will pop up where you can enter in the name of a file or program to run. While the launcher is sitting in the background of the system waiting for the keystroke pattern that brings it forward it will index the system. Each different launcher works a bit differently and the indexing options will be a bit different.

For Ubuntu, the one I am using is GNOME Do. This launcher is inspired by the Mac only Quicksilver, which is widely considered to be the benchmark of keystroke launchers and the one I use on that platform. For Windows, the one I use is Launchy, which is also available for Linux. To install GNOME Do, start by adding these lines to your "/etc/apt/sources.list" file:
deb http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
Next, run these commands at the Terminal:
  1. gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --keyserver keyserver.ubuntu.com --recv A5D19FDCAA6ABB440CD3464628A8205077558DD0
  2. gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --export --armor A5D19FDCAA6ABB440CD3464628A8205077558DD0 | sudo apt-key add -
Update your repository information and install the package:
sudo aptitude update
sudo aptitude install gnome-do
You can launch the application by going to Applications>Accessories>GNOME Do. Play around with the options and see what works best for you.

Monday, March 30, 2009

Download safely with MoBlock

There are many less than friendly sources out there on the Internet that want to establish connections with your computer so they can do less than friendly things. These connections could take place while using your web browser, but more often they occur when you try to download content via peer-to-peer networks. These less than friendly sources could be spammers or government organizations or they could be agents of the RIAA looking to report people for downloading and sharing copyrighted material illegally online.

Phoenix Labs is an online community that has released software that utilizes block lists that are updated frequently to prevent connections to these unfriendly sources. They put out a very nice GUI application for Windows called PeerGuardian2. They do not have an official Linux client that performs this duty, but there is a project called MoBlock which does perform the same function and is in the process of becoming the official Linux PeerGuardian client. For those of you running a Debian based distribution, packages are available through moblock-deb.

To start, add these lines to your "/etc/apt/sources.list" file:
deb http://moblock-deb.sourceforge.net/debian intrepid main
deb-src http://moblock-deb.sourceforge.net/debian intrepid main
Note: This assumes you are running Ubuntu 8.10 (Intrepid Ibex). If you are running a different version of Ubuntu or are running Debian, check their website for the appropriate entries. They tend to drop support for outdated versions of Ubuntu so you may have to do a bit of digging to find the appropriate mirror listed on their site. Or you could upgrade to a newer version, of course.

Next, run these commands, in order, at the Terminal:
gpg --keyserver wwwkeys.eu.pgp.net --recv 9072870B
gpg --export --armor 9072870B | sudo apt-key add -
sudo aptitude update
sudo aptitude install moblock
The first two lines import the necessary keys to verify the digital signatures of the packages. The next line updates the list of available packages. The last line will install MoBlock. The installation process is not as simple and straightforward as most, but its not terribly complicated. I just selected the default values for all of the options, which is fine unless you are looking for a really fancy setup. The daemon is controlled through an interface called blockcontrol and all commands must be run as root.

To start the daemon:
sudo blockcontrol start
To stop the daemon:
sudo blockcontrol stop
To restart the daemon:
sudo blockcontrol restart
To update the blocklist:
sudo blockcontrol update
To view the settings and status of the daemon:
sudo blockcontrol status
To check if the daemon is doing its job:
sudo blockcontrol test
The daemon will load upon system startup and the blocklists get updated daily on their own. For further details, check out the project page at http://moblock-deb.sourceforge.net/. There is also a GUI application available called mobloquer. You can download it by typing:
sudo aptitude install mobloquer
Since I'm running a headless server without a GUI you're on your own for figuring out how it works if you want a GUI. There are other GUIs available that work with MoBlock called MoBlockGUI and EasyBlock Interface that you could also try out if you are so inclined.

Obligatory disclaimer:
There are many uses for P2P networks, both legal and illegal. One of the best ways to obtain installation media for Linux distributions is by using BitTorrent, which is completely legal. I do not endorse or encourage the downloading of copyright or otherwise illegal content. If you choose to download such material you do so at your own risk and I will not be held responsible in any way for your actions.

Friday, March 27, 2009

Use FileZilla for speedy FTP/SFTP/FTPS transfers

FileZilla is a great free and open source FTP client I have been using for years on Windows. FileZilla is available for Windows, Linux, and Macs. On my Mac, however, I have been using Cyberduck, another free and open source program, because it supports better system integration. Both applications support FTP, SFTP, and FTPS, which are the three main file transfer methods I have historically used. Cyberduck has a problem though. Its SFTP transfers are so painfully slow that it is almost not even worth using. This is a known bug in the program.

FileZilla, on the other hand, does not suffer from such a bug. Now I have switched back to using FileZilla as my FTP client of choice on my Mac. FileZilla is also available as an FTP server for Windows and is a fantastic program that I have been using for years as well.

Wednesday, March 25, 2009

Update OpenOffice.org in Ubuntu

Ubuntu comes with OpenOffice.org preinstalled. OpenOffice.org is a free and open source office productivity suite designed as an alternative to Microsoft Office. Since Microsoft has yet to release Office for Linux, having this alternative available is important. OpenOffice.org is just about as good as Office for most things that most users will ever want to do. The version of OpenOffice.org that comes with Ubuntu is not the most recent. However, updating to the most current version, which is a major improvement over the prepackaged version, is relatively easy.

Add the following line to your /etc/apt/sources.list file:
deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main
Enter the following lines at the Terminal:
gpg --keyserver keyserver.ubuntu.com --recv-keys 60D11217247D1CFF
gpg --export --armor 60D11217247D1CFF | sudo apt-key add -
sudo aptitude update
sudo aptitude full-upgrade
And there you have it, fully updated OpenOffice.org, plus any other system updates that are available.

Saturday, March 21, 2009

Updated Transmission

Transmission has released an updated version since my previous post about it (although that version I was using happened to be a bit out dated at the time of writing...oops). This post is about Transmission 1.51 (7970) installed on Ubuntu 8.10 Server.

To start, make sure you have the correct repositories added to the listing located at "/etc/apt/sources.list". The lines to add read:
deb http://ppa.launchpad.net/transmissionbt/ubuntu intrepid main
deb-src http://ppa.launchpad.net/transmissionbt/ubuntu intrepid main
If you are using a different version of Ubuntu, substitute the word "intrepid" for the name associated with your version. 6.06 is "dapper", 8.04 is "hardy", 8.10 is "intrepid", and 9.04 is "jaunty" (9.04 is still in alpha, it gets released next month). Next you'll need to enter the following two commands at the Terminal:
gpg --keyserver keyserver.ubuntu.com --recv 976b5901365c5ca1
gpg --export --armor 976b5901365c5ca1 | sudo apt-key add -
These together will import the necessary keys to verify the signatures on the Transmission packages. Update the package manager with this command:
sudo aptitude update
Now you can install the Transmission CLI package with:
sudo aptitude install transmission-cli
This installs transmissioncli, a client that runs in the foreground, transmission-daemon, a client that runs in the background, and transmission-remote, a program that controls the daemon. The daemon and associated remote are the tools I use and the updated versions of them are even nicer than what I was using before.

Set a few preferences associated with the daemon:
transmission-daemon -b -L 2000 -l 500
The -b flag enables peer blocklists. These lists contain known bad IPs so its a good idea to not connect to them. the -L flag sets the global max number of peers you can connect to. A high number is good here. The -l flag sets the max number of peers each torrent can use. Keep in mind that if you set a high number for these without adjusting any settings on your router it can actually slow down your connection speed. Settings for the daemon are stored in "~/.config/transmission-daemon/settings.json".

Set your preferences associated with the remote:
transmission-remote -D -U -m -er -p [port] -w /path/to/downloads
The -D and -U flags set the max download and upload speeds to unlimited, respectively. To limit these speeds, substitute the capital letter for its lower case counterpart followed by an integer number of KBps. The -m flag enables UPnP. This needs to be enabled in your router in order to work. The -er flag requires that connected peer use encryption. Alternatively, this could be switched to -ep for encrytion preferred or to -et for encryption tolerated. The -p flag sets what port to use for incoming peer connections. The -w flag sets the default download location.

If at any time you are unable to connect to the daemon, you may have a port error. The daemon accepts connections from peers on one port and it listens to instructions from the remote on another port. To set the port that the remote talks to the daemon on, try this:
transmission-remote -P 9091
Port 9091 is the default port the daemon listens on for instructions. Now its time to start downloading. To add a torrent:
transmission-remote -a /path/to/file.torrent
To list all downloads:
transmission-remote -l
If you want to manipulate any torrents, you need to first select them:
transmission-remote -t [torrent]
The -t flag can work with bunch of different options. To select a torrent you will need to follow the -t with either the .torrent file, the torrent's hash, for its ID number. The easiest way of using the -t flag is with the ID, in my opinion. When you list all the torrents, the ID is listed in the first column.

To remove a torrent:
transmission-remote -t [id] -r
To list all the files in a torrent:
transmission-remote -t [id] -f
By default, you will be downloaded all of these files. If you don't want all of them, you can set this with the -G flag followed by the file ID. If you decide later on that you do, indeed want them, you can set this with the -g flag. For example:
transmission-remote -t [id] -G 1,3,5-9
transmission-remote -t [id] -g 5,7-9
transmission-remote -f [id] -g all
The first command says to not download files numbered 1, 3, and 5 through 9. The second command says to start downloading files numbered 5 and 7 through 9. The third command says to download all files in the torrent.

You can also set the priority for given files in a torrent using a similar syntax. The flags to use are -ph, -pn, and -pl for priority high, normal, and low. For example:
transmission-remote -t [id] -ph 4
transmission-remote -t [id] -pl 2,6-8
transmission-remote -t [id] -pn all
The first command sets file number 4 to high priority. The second command sets files numbered 2 and 6 through 8 to low priority. The third command sets all files to normal priority. By default, all files are set to normal priority.

This is only a handful of the options available. To learn more, check out the manuals or help listings with:
man transmission-daemon
man transmission-remote
transmission-daemon -h
transmission-remote -h
Happy downloading.

New Ubuntu server

I have two old towers I use as servers. I have always used the more powerful of the two (has a bigger hard drive too) as my main file server and the role of the other has varied. Historically I have also used Windows XP Pro as my primary OS for both servers. I have Ubuntu Desktop installed on the smaller server and Windows was on the bigger server until today. I've been so happy with how convenient it is to manage my Linux server over SSH without a need for RDP and autologin to run a BitTorrent client that today I decided to install Ubuntu Server on my bigger server.

The installer for Ubuntu Server isn't as nice or as graphical as it is for the Desktop version, but that's okay. I opted to go with Ubuntu 8.10, the latest version. The server edition doesn't include a GUI, which is also okay because I won't be using it anyway. The hard drive in this computer is 80GB so I made three seperate partitions on it: 10GB formatted to Ext3, 1GB formatted as Linux-swap, and the rest as Ext3. The 10GB partition is where I installed the operating system files. Linux uses a special partition for page file, which is my 1GB partition. As for the big partition, that's where I installed /home. This way if I need to reformat the system partition, I still have all of my personal files stored in my home directory.

It was nice to see the option to enable automatic system updates during the installation process. There is also a chance at the end of installation to install a variety of common server tools, like a LAMP server, DNS server, Samba server, etc. Ubuntu 8.10 also give the option to create an encypted directory in the home directory and lets you create a password to recover the files if necessary. The system files took up less than 1GB is space.

After installation and creating a user the only thing I needed to do before disconnecting the keyboard, mouse and display was install the SSH server. This is done by typing at the Terminal:
sudo aptitude install ssh
After that I switched over to using SSH from my laptop to configure everything else. Details on other software configurations to follow in later posts.

Wednesday, March 18, 2009

Updating Red Hat/Fedora/CentOS

I just started a class on Linux and the two distributions we're going to be working with primarily are Ubuntu 8.10 and CentOS 5.2. I already am familiar with Ubuntu but CentOS is new to me. CentOS is based off of Red Hat Enterprise Linux (RHEL). RHEL is a for pay Linux solution geared for use by corporations. They only provide installation binaries to their paying subscribers. However, since they are using the Linux kernal, they have to make all of their source code freely available according to the lisence agreement under which Linux is released. Fedora is the is a free Linux distribution which is sponsored by Red Hat, Inc. The CentOS project has taken the source code for RHEL and has made precompiled binaries available freely available, with a few changes to make it their own and to respect Red Hat's lisencing.

Unlike Ubuntu and other Debian based distributions which use apt for managing packages and software, CentOS and other RHEL based distributions use rpm. Rpm has a weakness in that it doesn't handle dependencies terribly well and so there is the yum tool. I got to use yum a bit after I recently installed a CentOS virtual machine on my laptop and had to install all the available updates. This took three steps:
yum check-update
yum update
The first command updates the local information about what package versions are available at the package repositories. The second command, su, is the Unix switch user command. Without any options, it assumes you mean root and prompts you for the root password. Sudo works a bit differently in CentOS compared to Ubuntu and I haven't had a chance to explore more into it just yet. The third command compares the installed versions of packages against the versions available in the repositories and, if there are updates available, prompts you to install them.

Another thing I love about Linux: most updates don't require you to reboot after installing them.

Wikipedia articles:

Display list of directories in the Terminal

Saw this neat trick over at Lifehacker today. It tells how to display just the sub directories and the not any of the files in the current directory in Terminal.

Lifehacker article

Sunday, March 15, 2009

Apt-Get vs. Aptitude

Just read an interesting article. I did some more digging and it looks to me like the aptitude tool is just plain better than apt-get because of its more efficient way of handling dependencies. Dependencies are software components that are sometimes used by multiple packages to save space. When a package is installed, all the necessary dependencies are installed with it. When a second package is installed that uses some of the same dependencies as the first package, it will just reuse those preexisting dependencies rather than installing them a second time. From what I can gather, aptitude is more efficient at handling dependencies than apt-get because it will remove orphaned dependencies, that is, dependencies that no packages are using. Apt-get will leave these behind by default. They can be removed, but aptitude will do it automatically.

It looks like I'm going to switch from apt-get to aptitude from now on.

More on dependencies.

Configuring Ubuntu's firewall

Ubuntu comes bundled with a firewall but it is not enabled by default. Since the Ubuntu project prides itself on being the Linux for everyone, the included firewall is intended to be uncomplicated and relatively easy to use. It is called ufw, which stands for "uncomplicated firewall." Getting it up and running is simple enough; turn it on with:
sudo ufw enable
This turns the firewall on and sets it to activate at boot. To turn it back off, swich the keyword enable for disable. This firewall is based upon rules. You set rules to either allow or deny services or ports. To enable a service, like SSH, for example, enter this command:
sudo ufw allow ssh
To explicitly deny a service, switch the allow keyword for deny. To remove this rule, type:
sudo ufw delete allow ssh
To explicitly allow a specific port:
sudo ufw allow [port]
You can optionally specify the protocol to allow following the port number. For example, to allow TCP connections on port 231 you would type:
sudo ufw allow 231/tcp
To set the default behavior for services and ports that have do not have explicit rules:
sudo ufw default deny
If you wish to allow connections by default, switch the deny keyword for allow. You can check the status of the firewall and the existing rules with:
ufw status
These might be some other useful services to enable:
  • mysql (database included as part of the LAMP stack)
  • www (allows connections to your webserver)
  • microsoft-ds (Windows file sharing a.k.a. Samba)
A listing of services you can specify by name is located at "/etc/services". If the service you're looking for isn't listed there, a pretty complete list of services and the ports they use is available here.

When configuring your firewall, general rule of thumb is to make it as restrictive as possible. That means to only open those ports you have to and other keep the system locked down. For this reason the default behavior on my firewall is to deny all connections except for those that are explicitly allowed.

If you are interested in a firewall with a GUI, you may find this article to be helpful.

Configure Linux file sharing with Samba

Windows file sharing uses a protocol called smb. Since Windows is the most commonly used operating system in the world, other operating systems offer compatibility with this protocol. This is done with a program called Samba. Today I set up Samba powered file sharing on my Ubuntu server. First, install the package:
sudo apt-get install samba
Configuration is done primarily through the Samba config file located at /etc/samba/smb.conf . Edit the line that says "workgroup = WORKGROUP" so that the all caps workgroup is the one you are using. Next, you need to add the following lines for each shared directory:

[share name]
comment = Shared Files
path = /path/to/share
writable = yes
browseable = yes
guest ok = no

What appears in brackets is the name your shared directory will have on the network, so name it something that makes sense. Make the comment say whatever you want. If you want the directory to be read only, switch the "writable" value to no. If you want to create a dropbox that will accept files but not allow others to read them, switch the "browseable" value to no. If you want to allow anonymous access, switch the "guest ok" value to yes. You may need to edit your file permissions to get this to work right. Do this using the chmod command.

You also need to setup which users may access your shared directories with the smbpasswd command:
sudo smbpasswd -a [username]
The username specified must be a legal user of the server. You will be prompted to enter a password. To make your changes take effect, restart the server:
sudo /etc/init.d/samba restart
If you need to tweak your config file you can tell the Samba daemon to reload the config file:
sudo /etc/init.d/samba reload

Updating Ubuntu

Software upgrades and system patches serve two major functions: 1) adding new features or functionality and 2) fixing security holes. Both are good reasons to keep your system up to date. Doing this in Ubuntu is remarkably easy. Run these two commands in succession:
sudo apt-get update
sudo apt-get dist-upgrade
The first command updates the package files from their sources. Without this, the system doesn't know that updates are available. The second command downloads and installs the available updates for the system and installed software.

Friday, March 13, 2009

Command Line BitTorrent with Transmission

Right now I have this nice little Ubuntu box that I've been playing with and configuring almost exclusively over SSH. Since my Windows server is acting up and needs a rebuild, last night I started playing around with Transmission. Transmission is a free and open source BitTorrent client for Unix systems. I have used it on my Mac and they have both a GUI and CLI client for Linux.

Installation on Ubuntu is a snap with a couple available options:
sudo apt-get install transmission (this installs the daemon, GUI and CLI client)
sudo apt-get install transmission-cli (this installs just the daemon and CLI client)
sudo apt-get install transmission-gtk (this installs just the GUI client)
I decided to install the entire package, daemon, GUI and CLI. I have a GUI running on my system that I am choosing not to use but this way I have the option if I decided to use it. The one thing I will say about CLI applications is that they are not nearly as intuitive to use as GUI ones
are. It tooks some playing around to get it figured out. In order to use it, you'll want to use the daemon. Daemons are programs that run in the background. In this case, it provides set it and forget it functionality for downloading torrents.

The first thing to do is tell the daemon where to store its socket file:
transmission-daemon -s ~/.transmission/daemon/
The daemon is controlled through a remote program. Before adding any torrents it would be a good idea to set some preferences. The command for my setup looks like this:
transmission-remote -DU -c required -p [port] -f [path to download location]
The -DU options set the download and upload speeds to unlimited. To set these to limited instead, swap the letter for its lower case version followed by a number of KBps. For example, "-d 50 -u 20" would set the max download speed at 50KBps and the upload speed at 20KBps. The -c option refers to encryption. The required keyword means that all peers are required to use encryption. Exchanging this for preferred means that peers with encryption will be preferred, but not required. The -p option sets the port to operate on. This should be the port number that is open on your router for BitTorrent connections. Instead or in addition to this, you can enable UPnP mapping with the -m option. This will only work if UPnP is enabled on your router. This is turned off with the -M option. The -f option will set the location where newly added torrents are downloaded to. For example, "~/Downloads/" will store all downloaded files in a directory called Downloads, located in your Home directory.

To add a torrent to the daemon, use this command:
transmission-remote -a [path to file].torrent
Start all torrents:
transmission-remote -s all
Stop all torrents:
transmission-remote -S all
Start a specific torrent:
transmission-remote -s [hash]
Stop a specific torrent:
transmission-remote -S [hash]
Remove all torrents:
transmission-remote -r all
Remove a specific torrent:
transmission-remote -r [hash]
Get hashes for all torrents:
transmission-remote -i
List all torrents with status:
transmission-remote -l
Quit the daemon:
transmission-remote -q
For more information about transmission-remote, check out the manual. Most Unix command have an associated manual entry. Access it with this command:
man transmission-remote
Happy downloading.

Thursday, March 12, 2009

Command Line Todo list

I recently decided to try out Gina Trapani's Todo.txt command line task manager. Its essentially a complicated shell script, which means that it won't run natively under Windows. It does, however, work under Cygwin. It's a neat little toy and I have been using it so far but I suppose only time will tell as to whether or not I find it to be practical for me. There is a tutorial on how to set it up over at the Todo.txt website. I followed those directions almost exactly. I found it to be unnecessary to add anything to my .profile file and my alias looks like this:
alias t='~/Documents/todo/./todo.sh'
If you have looked through my .bashrc file you may have noticed that this alias is missing. It lives in my .bash_aliases file instead along with a few others that only work with my personal configuration.

Updated .bashrc

I spent some more time today on my .bashrc file. I fixed a bug I was having with my customized prompt, found some new documentation which I added, and cleaned up some of the comments. It still isn't perfect as there is an issue with the cursor jumping to partway through the prompt message when scrolling through previous commands and when editing a previous command.


Tuesday, March 10, 2009

Sunbird vs. iCal

I've been using Mozilla Sunbird for my calendar duty for a few years now. I am a fan of Mozilla products like Firefox and Thunderbird and Sunbird does a fair job, considering that it has yet to see a 1.0 release. By using the Provider for Google Calendar extension, Sunbird can have bidirectional access to Google Calendar accounts. Since Sunbird is cross platform, when synced with GCal this allows for access to the same calendar from multiple computers running different operating systems.

But despite my desire to open source and cross platform software like that provided by Mozilla over proprietary and single platform software, I have recently found myself using Apple's bundled calendar application iCal over Sunbird. Google has released a standalone application called Calaboration that enables iCal to have bidirectional access to Google calendars. I set this up on a whim a right when Calaboration was released in the fall but never really used iCal for much until recently.

The more complete system integration, not to mention faster startup time of iCal has prompted me to switch my calendar application of choice on OS X from Sunbird to iCal. This is in part because I started using a Dashboard widget called QuickCal. QuickCal is nice in that it allows you to create calendar events using plain language.

Saturday, March 7, 2009

Free secure proxy via SSH

I'm always on the lookout for new and better way to secure my browsing on untrusted networks. It is easy for someone to sit at Panera with WireShark and sniff packets left and right. Hotspot Shield helps with this but they are an unfamiliar company and I don't know how far I want to trust them. VPNs are a nice way around this. Windows XP Pro has one built in as does Windows Server. OpenVPN is another alternative, althought I do not know if they allow you to send all your traffic over the encrpted tunnel or not. Well I saw and article on Lifehacker from a while back that offered a great new solution.

SSH is the unix secure shell protocol that allows for remote access to a computer command line, secure file transfers, etc. Well SSH can also be used as a proxy server with an encrypted connection between the client and the server. On the server side, as long as an SSH server is already running, no other configuration is needed. Setup on the client side is two part. First comes the terminal connection. The syntax for this is "ssh -ND [port] [username]@[servername]". After entering your password, the connection will hang.

This creates a local socket listening on the specified port and forwards all connections on that port to the server over the encrypted connection. To make use of this, each application needs to be configured to use a proxy server. Just about every program that needs to connect to the internet for anything more than checking for updates will have a way to do this. Set the application for manual proxy configuration. The proxy type is a SOCKS Host. Both versions 4 and 5 are supported. The host to use is "localhost" and the port to use is the one you specified when you connected at the terminal.

If you have an SSH server, in order to access it over the internet you'll need to forward port 22 to it and have either a static IP address or assign a hostname to your address and update it each tme your dynamic address changes. This is easily done with a free service from DynDNS.

Lucky for me, there is an SSH server at school I have access to.

Wednesday, March 4, 2009

Bash console customization

I spent some time over the past two days learning about Bash shell customization. For Linux users, this is done by editing "~/.bashrc". Mac and Cygwin users do this by editing "~/.bash_profile". The contents of my .bash_profile is "source ~/.bashrc". This directs the shell over to a .bashrc file which contains my customizations. I've made my .bashrc file available at my website.

Direct link

Monday, March 2, 2009

Ram Disks

Today I had the inspiration to look up how to enable RAM disks on my laptop. A RAM disk is essentially a partitioned section of a system's main memory which has been set aside for file storage. There are basically two reasons for wanting to do this. First, RAM has extremely fast read/write times. Anything stored in a RAM disk will be accessible by the computer at a significantly faster speed than storing data on say a hard disk. The other reason to store data on a RAM disk is because of the volatile nature of system memory. Except in some rare circumstances, all data stored in RAM is purged as soon as it loses power. When working with highly sensitive data like passwords or when working with cryptography storing data on a RAM disk is a rather appealing idea.

I found two nice and free graphical utilities for setting up RAM disks on OS X. First is called MakeRamDisk. This automatically creates a 64MB RAM disk when it is launched. To change this automatic setting or to make a disk of a different size, holding the option key while launched the app will open an options dialog. The other one I found is called Esperance DV. This gets installed as a prefPane in System Preferences. When I went to install this however I had to do so manually as I got an error when the system tried to install it automatically.

Installing prefPanes manually is relatively easy. An individual user's prefPanes are stored in "~/Library/PreferencePanes/" and prefPanes available to all users are stored in "/Library/PreferencePanes/". Once I got that installed and I relaunched System Preferences it was good to go. The Esperance DV preference pane gives a nice graphical menu with some options like setting the disk's name, size, and enabling auto creation upon system startup. Additionally there is a feature to save the RAM disk to a dmg and to move some system caches onto the RAM disk for speed.

I also found an article about creating a RAM disk from Terminal which I tried out, but the graphical are just more convenient in my humble opinion. Here is a link to that article.