Setup Oh My Zsh on FreeBSD

“Oh My Zsh is an open source, community-driven framework for managing your zsh configuration.

Sounds boring. Let’s try again.

Oh My Zsh will not make you a 10x developer…but you might feel like one.”

First of we need some prerequisites:

  • pkg
  • zsh
  • curl
  • git

Let’s get this install going.

# become root
su -

# check if pkg is installed if it is not it will promt you with an easy installer.
root@bsd-test:~ # pkg help
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.10.1...
Extracting pkg-1.10.1: 100%
Usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>|-r <rootdir>] [-C <configuration file>] [-R <repo config dir>] [-o var=value] [-4|-6] <command> [<args>]
Global options supported:
...
...
...

root@bsd-test:~ # pkg install zsh curl git
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    6 MiB   2.0MB/s    00:03
Processing entries: 100%
FreeBSD repository update completed. 26598 packages processed.
All repositories are up to date.
Updating database digests format: 100%
...
...
...
root@bsd-test:~ #

# now we can set the zsh as the default shell for our user

root@bsd-test:~ # chsh -s zsh svanbroekhoven
chsh: user information updated

# Close the ssh session and reopen it.
# You will be greated with a zsh welcome message, close this with "q"
# Lets pull in oh-my-zsh

bsd-test% sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Cloning Oh My Zsh...
Cloning into '/home/svanbroekhoven/.oh-my-zsh'...
remote: Counting objects: 831, done.
remote: Compressing objects: 100% (700/700), done.
remote: Total 831 (delta 14), reused 777 (delta 10), pack-reused 0
Receiving objects: 100% (831/831), 568.74 KiB | 988.00 KiB/s, done.
Resolving deltas: 100% (14/14), done.
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc
         __                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/                       ....is now installed!


Please look over the ~/.zshrc file to select plugins, themes, and options.

p.s. Follow us at https://twitter.com/ohmyzsh.

p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.

➜  ~ 

That’s all, now find yourself a fancy theme and place it in: ~/.zshrc

The default is ZSH_THEME=robbyrussell, I often use ZSH_THEME="aussiegeek"

To view the results of your edit simply reopen your ssh session.

Cloud & Open-Source magician 🧙‍♂️

I try to find the KISS in complex systems and share it with the world.

comments powered by Disqus