A Linux Development Desktop with VMware Horizon - Part III: Shell
High ⚡ Way to Shell
The operationalization of platforms such as e.g. Kubernetes, or the use of tools for building services or applications such as Docker, requires in both cases the use of the command-line. There are dozens of great plugins, themes and extensions out there to pimp your shell so that it´ll help you to increase velocity as well as useability.
Part III of my series is focused on the Shell and which “Highway” you can take to have the described tool available at the end.
1. ZSH aka Z shell
ZSH is a extended shell with lots of features, support for plugins and themes.
Ubuntu:
|
|
CentOS:
Should be installed by default.
|
|
2. Oh My ZSH
A community-driven framework for managing your Z shell configuration.
Ubuntu:
|
|
CentOS:
|
|
Verify if ZSH is set as your new default Shell:
|
|
2.1 ZSH Syntax Highlighting
https://github.com/zsh-users/zsh-syntax-highlighting
This plugin enables highlighting of commands whilst they are typed and it´ll help you to avoid syntax erros before you run a command.
CentOS & Ubuntu:
Let´s clone the repository into our oh-my-zsh plugins directory:
|
|
Enable the plugin in your zsh config file (~/.zshrc
) in the “plugins section”.
|
|
Restart your terminal.
2.2 Install Powerline Fonts
https://github.com/powerline/fonts
Needed fonts for the Powerlevel9k theme (step 4.).
Ubuntu:
|
|
CentOS:
|
|
2.3 Powerlevel9k
https://github.com/Powerlevel9k/powerlevel9k
This theme will give your shell a new shine.
CentOS & Ubuntu:
|
|
Replace the default ZSH_THEME with the new Powerlevel9k theme:
|
|
The Powerlevel9k theme gives you some pretty neat customization options which makes your terminal even more powerful.
Here´s my configuration:
|
|
And you should also paste the following variable to the top of your .zshrc file, otherwise you will get an error when using tmux
later.
|
|
A logout or reboot of the system is necessary for the changes to take effect.
The result:
I love it! And it doesn´t only looks good, it also comes in very handy if you work e.g. with Git
as you can see on Figure II for example. The right screenshot shows you that I am in a git branch called featurebranch and the color indicates me, that my workingtree is either clean and theres nothing to commit (green) or that new files were added and needs to be commited (orange).
More! More! More!
3 Homebrew on Linux 🍺
https://docs.brew.sh/Homebrew-on-Linux
Homebrew is a package manager (like Snappy) which simplifies the installation of software on your OS and should not be missing if you ask me.
CentOS & Ubuntu:
|
|
The installation-script will throw a Warning at the end, because it points out that /home/linuxbrew/.linuxbrew/bin
isn´t in your PATH.
Add the path to your .zshrc dot-file.
|
|
4 CLI´s and tools
…I´m using and I´d like to recommend
kubectl - https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux
|
|
4.1 ZSH Autocompletion for kubectl
https://v1-16.docs.kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete
|
|
4.2 Powershell
https://snapcraft.io/powershell
Installation via snap
:
|
|
4.3 KinD - Kubernetes in Docker
https://github.com/kubernetes-sigs/kind
4.4 Octant
https://github.com/vmware-tanzu/octant
4.5 tmux
tmux
is a terminal multiplexer.Enable Mouse-scrolling: Scrolling the terminal pages by using the mouse-wheel is natural for me and because it´s not enabled by default when using tmux
I need to enable it. Settings like this for example can be applied while running tmux
. Press ctrl + b and then type :set -g mouse on
.
4.6 bat
https://github.com/sharkdp/bat
bat
is a cat clone with syntax highlighting and Git integration.4.7 glances
https://github.com/nicolargo/glances
glances
is a cross-platform monitoring tool.4.8 htop
https://github.com/hishamhm/htop
htop
is an interactive process viewer.4.9 ctop
https://github.com/bcicen/ctop
ctop
provides a concise and condensed overview of real-time metrics for multiple containers:4.10 prettyping
https://github.com/denilsonsa/prettyping
prettyping
is a wrapper around the standard ping tool with the objective of making the output prettier, more colorful, more compact, and easier to read.And all of them can be easily installed via brew
:
|
|
Addtionally to htop
, ytop
(former gotop) is a pretty neat process and system monitor.
4.11 ytop
https://github.com/cjbassi/ytop
|
|
4.12 figlet
4.13 lolcat
https://github.com/busyloop/lolcat
|
|
|
|
4.14 cowsay
You should have a look at this post regarding cowsay 😄: “cowsay is the Most Important Unix-like Command Ever”
|
|
Last but not least!
4.15 Asciinema
A perfect way how you can easily record your terminal sessions.
|
|
5 Shell Aliases
Put the following aliases for the individual commands to the end of your .zshrc
file
|
|
Change Log:
- [2020-03-10]: Added Enable Mouse-scrolling for
tmux
; ZSH Syntax Highlighting; Powerlevel9k configuration - [2020-03-10]: Updated Figure II
- [2020-03-18]: Added Glances & Powershell