Posts > Configuring a Chromebook for web development
22 Jul 2015
To fill the time commuting to work, I recently bought a Chromebook which is basically a cheap laptop designed to use Chrome Apps instead of traditional, installable desktop applications.
Chromebook devices run Chrome OS created by Google and based on the Linux kernel. Access to the operating system and Linux shell is hidden by default but you can access it with a bit of effort to unlock it's full potential.
Setup a local development environment
- Enable Developer Mode
- When the OS verification is OFF screen is shown, press Ctrl + D to dismiss the warning and boot Chrome OS
- Login to your Google account
- Press Ctrl + Alt + T to open a terminal window
- Type shell and press Enter to enter the Linux shell
- Install the Chromebrew package manager
- To allow for SSH connections to other servers, install Secure Shell
- To access the Linux Shell from it's own window and be able to Pin it to the Chrome OS shelf, install Crosh Window
After this process is completed, you'll have Git installed locally.
Git and Vim configuration
Open the Crosh Window app and open the Linux Shell:
Install Vim so you can edit files and Git commit messages via the Terminal:
crew install vim keep
Commands to set basic Git settings and set Vim as the default Git editor:
git config --global user.email "firstname.lastname@example.org" git config --global user.name "Your Name" git config --global core.editor "vim"
Configure Vim to work with the Chromebook device by editing the ~/.vimrc file to include:
You might also want to add more Vim settings to suit your needs. These will set the default settings for Vim when you edit files.
You're now ready to git clone a code repository to a local folder, such as:
~/Downloads/ /media/removable/SD Card/
To create a shortcut command called cdgit for getting to a Git folder on an SD card, add the following to the end of the ~/.bashrc file:
alias cdgit='cd /media/removable/SD\ Card/Git' # Change directory to the Git folder on the SD card
To avoid the annoying system beep on startup while in Developer Mode, just press Ctrl + D when the OS verification is OFF screen is shown.
If you'd prefer a more modern text editor, you can install one from the Web Store, such as Caret.
Ready to go!
You now have a cheap, portable device to develop your next web app on!