I like doing stuff on the commandline. If you have used it for a time, you discover that there are more options then the standard from you operating system. I´ll use a Raspberry PI as an example for which alternatives (zsh) I´ve choosen.
Generally speaking all tools are also available on Linux / MacOS systems (for the Linux Subsystem on Windows I have no idea).
I use zsh as a drop-in replacement for bash. On newer OS-X versions it´s the default shell. However you can still tweak it a little bit :-). Once if started doing stuff with Raspberry PIs I realized I miss my nice custom zsh.
$ sudo apt install zsh -y
In order to get a way better experience I recommend Oh My Zsh for managing you zsh config.
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
After the installation it´ll prompt if you want to change to the default shell to zsh. Please answer with yes :-).
Afterwards you will have to restart your terminal and reconnect your session to the PI.
In order to make the zsh rly looking awesome and full with features go for Powerlevel10k theme.
Better tools on you commandline
A lot of the unix tools have been around for many years and might have newer / better replacements.
Exa is a replacement for ls.
First of all, run an update.
sudo apt update
Afterwards install exa by:
sudo apt install -y exa
Now you´re able to run exa. My next step is to replace ls with exa. There for you have two options, either set an alias or do it in the plugins part in you zshrc file.
# general use alias ls='exa' # ls alias l='exa -lbF --git' # list, size, type, git alias ll='exa -lbGF --git' # long list alias llm='exa -lbGd --git --sort=modified' # long list, modified date sort alias la='exa -lbhHigUmuSa --time-style=long-iso --git --color-scale' # all list alias lx='exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale' # all + extended list # specialty views alias lS='exa -1' # one column, just names alias lt='exa --tree --level=2' # tree
fzf is a command-line fuzzy finder. It can be used for all type of searches. My main use case is searching the history and having a better search in VIM.
sudo apt-get install fzf
Don´t forget to restart your terminal. If you want to also install it to VIM as well, follow the guide on the git repo.
For examples: click here .
- to @leyrer please follow his talks . Especially the modern command line tools inspired me to try some alternatives.
- to Darrin Tisdale for exa zshrc.
- to everyone who is contributing great tools following the UNIX philosphy.
On MacOS I use way more alternative tools, there´ll be another blog post about them.