Cyrus Stoller home about consulting

Setting up an Ubuntu machine for travel

I recently bought a cheap laptop to take traveling that I would be less concerned about being stolen and/or damaged. While it’s much slower than my Macbook Pro, I’m still able to surf the web, write blog posts, and SSH into my servers. I picked the ASUS X200MA because it has a built-in VGA, HDMI, RJ45 (ethernet port), SD card slot, and 3 USB ports.

I agree with the reviews I read online. The screen and keyboard are less than ideal, but I’m willing to overlook these shortcomings given this is not intended to be my primary machine (see this post for how I setup my Mac).

Here are the things I installed before I left for my trip.

$ sudo apt-get -y install vim
$ sudo add-apt-repository ppa:webupd8team/sublime-text-2
$ sudo apt-get update
$ sudo apt-get -y install sublime-text
$ echo 'deb http://linux.dropbox.com/ubuntu trusty main' \
 | sudo tee /etc/apt/sources.list.d/dropbox.list
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
$ sudo apt-get update
$ sudo apt-get -y install dropbox

After this I needed to launch Dropbox for the first time via the launcher, but after that the daemon started automatically on login. If you’re still having trouble you may want to try:

$ nautilus-dropbox
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub \
 | sudo apt-key add -
$ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" \
  >> /etc/apt/sources.list.d/google-chrome.list'
$ sudo apt-get -y install google-chrome-stable

Generate a new SSH keypair. If you need a reminder on how to do this, or have never done it before, check out this tutorial from Github.

$ sudo apt-get -y install git-core

Here are some prerequisites that are needed to compile ruby.

$ sudo apt-get -y install curl
$ sudo apt-get -y install openssl
$ sudo apt-get -y install autoconf bison build-essential libc6-dev libffi-dev \
  libmysql++-dev libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
  libyaml-dev make zlib1g-dev

Next, add the following to the end of your ~/.bashrc

export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
  export PATH="${RBENV_ROOT}/bin:${PATH}"
  eval "$(rbenv init -)"
fi

And then you can run the following

$ cd
$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ git clone git://github.com/sstephenson/ruby-build.git \
  ~/.rbenv/plugins/ruby-build
$ rbenv install 2.1.5
$ rbenv global 2.1.5
$ ruby -v

Or if this feels like too many steps, you can checkout out an rbenv installer like this or this.

To decrease gem installation times, I also like to run

$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
$ sudo apt-get -y install node
$ sudo apt-get -y install imagemagick
$ sudo add-apt-repository ppa:pitti/postgresql
$ sudo apt-get update
$ sudo apt-get -y install postgresql

I use LaTex for invoicing. Most people probably do not need to have this installed.

$ sudo apt-get install texlive-full
$ sudo sh -c "echo 'deb http://archive.canonical.com/ubuntu/ trusty partner' \
  >> /etc/apt/sources.list.d/canonical_partner.list"
$ sudo apt-get update
$ sudo apt-get -y install skype

Open Thunderbird and install ExQuilla to enable Microsoft Exchange support.

$ sudo apt-get -y install flashplugin-installer
$ sudo apt-get -y install unity-tweak-tool

Conclusion

That’s it for now. Happy New Year!

Category Tutorial