DevOps: My all-in-one & must have list
Git
To install git
type:
sudo apt install git && git config --global credential.helper store
git config --global user.name "your username"
git config --global user.password "your password"
Zsh
In order to install zsh
on Debian or its deratives, please use:
sudo apt update && apt install zsh
Then type:
chsh -s /usr/bin/zsh
Then log out and log in and start your Terminal.
After this press 2
:
(2) Populate your ~/.zshrc with the configuration recommended
by the system administrator and exit (you will need to edit
the file by hand, if so desired).
Oh My Zsh
You can install Oh My Zsh with:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Then you should see:
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/ ....is now installed!
Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.
All possible themes are available here.
In order to enable a theme, set ZSH_THEME
to the name of the theme in your ~/.zshrc
, before sourcing Oh My Zsh; for example: ZSH_THEME=robbyrussell
If you do not want any theme enabled, just set ZSH_THEME
to blank: ZSH_THEME=""
.
Plugins
For the sake of happiness, add this at plugins
in your .zshrc
:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
plugins=(git aliases debian branch github zsh-autosuggestions zsh-syntax-highlighting zsh-completions zsh-interactive-cd zsh-navigation-tools)
Fonts
All the best NerdFonts
can be found here.
Although my winner is the: Cascaydia Cove Nerd Font
Unpack fonts to /usr/share/fonts/ and rebuild the cache
:
fc-cache -f -v
Powerlevel10k
Clone repository:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Set ZSH_THEME="powerlevel10k/powerlevel10k"
in ~/.zshrc
.
And for Powerlevel10k instant prompts
, add this to .zshrc
:
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
Build essentials
Type:
sudo apt install build-essential
Snap
$ su root
apt update
apt install snapd
Re-log and type:
sudo snap install core
Flatpak
For Flatpak type:
sudo apt install flatpak gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Restart OS and voula.
Global Protect OpenConnect
For non-Debian distros, you can use the project GlobalProtect OpenConnect.
In case you want to install it, type:
wget http://launchpadlibrarian.net/704701349/libwebkit2gtk-4.0-37_2.43.3-1_amd64.deb
wget http://launchpadlibrarian.net/704701345/libjavascriptcoregtk-4.0-18_2.43.3-1_amd64.deb
sudo dpkg --install *.deb
sudo apt-get install gir1.2-gtk-3.0 gir1.2-webkit2-4.0
sudo add-apt-repository ppa:yuezk/globalprotect-openconnect
sudo apt-get update
sudo apt-get install globalprotect-openconnect
Debian 12+
For Debian-based distros, use this:
sudo apt get update
sudo apt install openconnect network-manager-openconnect network-manager-openconnect-gnome
To test it, use GUI in Gnome or type:
sudo openconnect --protocol=gp global.protect.server -u user-name
Homebrew
To install brew
, which is not only for macOS
developers, type:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After this, do:
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/$USER/.zprofile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Docker
Setup
To install type:
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Add Docker to sudoers
sudo groupadd docker
sudo usermod -aG docker ${USER} && sudo newgrp docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R
sudo chmod 666 /var/run/docker.sock
IP Range
In order to change the IP range for containers, go to:
sudo nano /etc/docker/daemon.json
Paste:
{
"bip": "172.24.0.1/24",
"fixed-cidr": "172.24.0.1/25",
"insecure-registries": ["registry:32000"]
}
Then restart the daemon:
sudo systemctl daemon-reload && sudo systemctl restart docker
Nerdctl
To install nerdctl
, use brew
:
brew install nerdctl
Portainer
For Portainer, type:
docker volume create portainer_data \
&& docker run -d -p 8000:8000 -p 9443:9443 \
--name portainer --restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer-ce:latest
Then visit https://localhost:9443/.
QEMU/KVM
Install QEMU/KVM
For a QEMU and KVM
, type:
sudo apt install -y qemu-kvm libvirt-daemon bridge-utils virtinst libvirt-daemon-system
sudo apt install -y virt-top libguestfs-tools libosinfo-bin qemu-system virt-manager
Setup grants for KVM
First, add your username to kvm
group:
sudo systemctl stop libvirtd
sudo usermod -aG libvirt ${USER}
sudo usermod -aG libvirt-qemu ${USER}
sudo usermod -aG kvm ${USER}
sudo usermod -aG input ${USER}
sudo usermod -aG disk ${USER}
sudo virsh net-start default
sudo virsh net-autostart default
sudo systemctl start libvirtd
Set permissions for QEMU processes in /etc/libvirt/qemu.conf
# Some examples of valid values are:
#
# user = "qemu" # A user named "qemu"
# user = "+0" # Super user (uid=0)
# user = "100" # A user named "100" or a user with uid=100
#
#user = "libvirt-qemu"
user = "your_usr"
# The group for QEMU processes run by the system instance. It can be
# specified in a similar way to user.
#group = "libvirt-qemu"
group = "libvirt"
# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
# dynamic_ownership = 0
Refresh group membership:
su - ${USER}
Add an alias to your ~/.zshrc
:
echo "alias virsh='EDITOR=nano sudo virsh && cd /etc/libvirt/qemu'" >> ~/.zshrc
Finally:
source ~/.zshrc
sudo systemctl restart libvirtd
And:
virsh
list --all
start mydomain
Add network bridge
First, you need to edit /etc/network/interfaces
:
# Bridge setup
iface br0 inet dhcp
bridge_ports eth0 eno1
Restart manager:
sudo service network-manager restart
Check if br0
is up:
$ ip a s br0
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether fe:54:00:b5:c9:02 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.1/24 brd 10.10.10.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::7c49:43ff:feaf:4d4b/64 scope link
valid_lft forever preferred_lft forever
You can check if everything is good with:
virsh net-list --all
Test QEMU/KVM
To test it out, type for example:
❯ sudo systemctl status libvirtd
○ libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; preset: enabled)
Active: inactive (dead) since Thu 2023-07-06 20:57:55 CEST; 29min ago
Duration: 2min 116ms
TriggeredBy: ● libvirtd-ro.socket
● libvirtd.socket
● libvirtd-admin.socket
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 68980 (code=exited, status=0/SUCCESS)
CPU: 112ms
lip 06 20:55:55 hea-runnerw-03 systemd[1]: Starting libvirtd.service - Virtualization daemon...
lip 06 20:55:55 hea-runnerw-03 systemd[1]: Started libvirtd.service - Virtualization daemon.
lip 06 20:57:55 hea-runnerw-03 systemd[1]: libvirtd.service: Deactivated successfully.
sudo virt-install \
--name deb11 \
--ram 2048 \
--vcpus 2 \
--disk path=/var/lib/libvirt/images/deb11-vm.qcow2,size=20 \
--os-type linux \
--os-variant debian9 \
--network bridge=br1 \
--graphics none \
--console pty,target_type=serial \
--location 'http://ftp.debian.org/debian/dists/bullseye/main/installer-amd64/' \
--extra-args 'console=ttyS0,115200n8 serial'
Kubernetes
Kubectl
sudo apt update \
&& sudo apt install -y ca-certificates curl \
&& sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" \
| sudo tee /etc/apt/sources.list.d/kubernetes.list \
&& sudo apt-get update \
&& sudo apt-get install -y kubectl
Then add this to .zshrc:
source <(kubectl completion zsh)
If you get an error like 2: command not found: compdef
, then add the following to the beginning of your ~/.zshrc
file:
autoload -Uz compinit
compinit
VMware Tanzu
Then obtain the vSphere plugin to use it with Tanzu. And unzip vsphere-plugin
to your /usr/bin/
and add:
echo 'export PATH=$PATH:/usr/bin/vsphere-plugin/bin' >> ~/.zshrc
Helm
Install it through:
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
And add completions to .zshrc
:
source <(helm completion zsh)
Argo
For both: Workflows and CD, better is to use brew
to install CLI’s.
The argo
stands for Workflows CLI
, while argocd
for ArgoCD
:
brew install argo argocd
CLI’s
Terraform
For Terraform
instalation type:
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
And add it to your .zshrc
:
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/bin/terraform terraform
zstyle ':completion:*' menu select
fpath+=~/.zfunc
Vagrant
For Vagrant
type:
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
In case of usage with KVM/QEMU, install this:
vagrant plugin install vagrant-libvirt && vagrant plugin install vagrant-mutate
Note: You need to have QEMU/KVM and libvrt installed
.
AWS
To install AWS CLI type:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install -i /usr/local/aws-cli -b /usr/local/bin
rm -r aws awscliv2.zip
EKS
To install eksctl
which is the official CLI for Amazon EKS, type:
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH
curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"
# (Optional) Verify checksum
curl -sL "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check
tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz
sudo mv /tmp/eksctl /usr/local/bin
Azure
This can be found in the default repository:
sudo apt update && sudo apt install azure-cli
Apps
Visual Studio Code
To install it, use:
sudo apt install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt install apt-transport-https
sudo apt update
sudo apt install code
In order to have italics like below:
Add this to your config:
"editor.tokenColorCustomizations": {
"[*Light*]": {
"textMateRules": [
{
"scope": "ref.matchtext",
"settings": {
"foreground": "#000"
}
}
]
},
"[*Dark*]": {
"textMateRules": [
{
"scope": "ref.matchtext",
"settings": {
"foreground": "#fff"
}
}
]
},
"[Mosaic]": {
"textMateRules": [
{
"scope": [
// Keywords to be in italic
"comment",
"entity.name.type.class", // class names
"keyword", // import, export, return...
"constant", // String, Number, Boolean..., this, super
"storage.modifier", // static keyword
"storage.type.class.js" // class keyword
],
"settings": {
"fontStyle": "italic"
}
},
{
"scope": [
// Keywords to exclude from italics (VSCode has some defaults for italics)
"invalid",
"keyword.operator",
"constant.numeric.css",
"keyword.other.unit.px.css",
"constant.numeric.decimal.js",
"constant.numeric.json"
],
"settings": {
"fontStyle": ""
}
}
]
}
}
JetBrains
For Jetbrains Toolbox
, download binary from: here and unpack it in /usr/bin/
.
Flameshot
For screenshot application like Lightshoot
on Windows, use this:
sudo apt install flameshot
GitHub Desktop
For GitHub Desktop
, please type:
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/shiftkey-packages.gpg > /dev/null
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'
sudo apt update -y && sudo apt install github-desktop
Packages
Kerberos
Install it via:
sudo apt install krb5-user -y
Then edit the config
:
sudo nano /etc/krb5.conf
Like this:
[libdefaults]
default_realm = company.local
[realms]
company.local = {
kdc = DC0.company.local
admin_server = DC0.company.local
}
[domain_realm]
.company.local = COMPANY.LOCAL
Then use, to log in:
kinit username@COMPANY.LOCAL
Check it with:
$klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: username@COMPANY.LOCAL
Valid starting Expires Service principal
27.05.2022 08:59:22 27.05.2022 18:59:22 krbtgt/COMPANY.LOCAL@COMPANY.LOCAL
renew until 28.05.2022 08:59:17
To create the `keytab` for log in purposes, use:
ktutil
addent -password -p username@COMPANY.LOCAL -k 1 -e RC4-HMAC
wkt /dir/username.keytab
Oracle Client
For Oracle Client
, paste this:
# For Debian
sudo apt install -y libaio1 unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc
# For Ubuntu
sudo apt install -y unixodbc-dev libaio-dev libaio1t64
ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
sudo mkdir -p /opt/oracle
cd /opt/oracle/
sudo wget -P /opt/oracle https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-basic-linux.x64-19.8.0.0.0dbru.zip
sudo wget -P /opt/oracle https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-sqlplus-linux.x64-19.8.0.0.0dbru.zip
sudo wget -P /opt/oracle https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-sdk-linux.x64-19.8.0.0.0dbru.zip
sudo unzip instantclient-basic-linux.x64-19.8.0.0.0dbru.zip -d /opt/oracle
sudo unzip instantclient-sqlplus-linux.x64-19.8.0.0.0dbru.zip -d /opt/oracle
sudo unzip instantclient-sdk-linux.x64-19.8.0.0.0dbru.zip -d /opt/oracle
export PATH="$PATH:/opt/oracle/instantclient_19_8"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/oracle/instantclient_19_8"
sudo ldconfig
Microsoft SQL Server ODBC
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
#Debian 12
curl https://packages.microsoft.com/config/debian/12/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.zshrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install -y unixodbc-dev
# optional: kerberos library for debian-slim distributions
sudo apt-get install -y libgssapi-krb5-2
Or just download the .dpkg and install it:
wget https://packages.microsoft.com/debian/12/prod/pool/main/m/msodbcsql17/msodbcsql17_17.10.5.1-1_amd64.deb
wget https://packages.microsoft.com/debian/12/prod/pool/main/m/msodbcsql18/msodbcsql18_18.3.2.1-1_amd64.deb
sudo dpkg -i msodbcsql17_17.10.5.1-1_amd64.deb
sudo dpkg -i msodbcsql18_18.3.2.1-1_amd64.deb
Languages
Python
In Debian 12
, the most recent version is included - 3.11.2
.
Just install poetry
and virtualenv
for future isolated deployments:
sudo apt install python3-virtualenv python3-poetry
Ruby
To install Rbenv
, type:
sudo apt update && sudo apt install rbenv
echo 'eval "$(/usr/bin/rbenv init - zsh)"' >> ~/.zshrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
To install Ruby
:
# List latest stable versions:
$ rbenv install --list
3.0.6
3.1.4
3.2.2
jruby-9.4.5.0
mruby-3.2.0
picoruby-3.0.0
truffleruby-23.1.1
truffleruby+graalvm-23.1.1
# List all local versions:
$ rbenv versions
system
* 3.1.2 (set by /home/${USER}/.rbenv/version)
truffleruby+graalvm-22.1.0
# Install a Ruby version:
$ rbenv install 3.1.2
And you should see something like this:
Downloading ruby-3.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
Installing ruby-3.2.2...
Installed ruby-3.2.2 to /home/USER/.rbenv/versions/3.2.2
Now set your Ruby
build as default:
$ rbenv global 3.2.2 # Set the default Ruby version for this machine
# or:
$ rbenv local 3.2.2 # Set the Ruby version for this directory
$ rbenv uninstall 3.1.2
Last but not least, install Bundler
:
gem install bundler
And voila!
For YJIT, you need to have Rust installed and then type:
RUBY_CONFIGURE_OPTS="--enable-yjit" rbenv install 3.3.1
Ruby Kernel for Jupyter Notebooks
To use Ruby as kernel in Jupyter Notebooks, please type:
$ gem install iruby && source ~/.zshrc
$ iruby register --force
TruffleRuby GraalVM
To install GrallVM TruffleRuby, you can use rbenv
too:
rbenv install truffleruby+graalvm-22.1.0
You may need to install OpenSSL v1.1
too:
brew install openssl@1.1
If compilation fails, add it to your .zshrc
:
# Ruby GraalVM
export LANG=en_US.UTF-8
export PATH="/home/linuxbrew/.linuxbrew/opt/openssl@1.1/bin:$PATH"
export OPENSSL_PREFIX="/home/linuxbrew/.linuxbrew/opt/openssl@1.1"
export LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include"
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$OPENSSL_PREFIX"
Crystal
Crystal
- the compiled and typed little Ruby’s brother, can be installed on Debian 12 using two methods:
default setup via .sh
or through
apt
.
Default one:
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
Apt (preferred):
echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_Testing/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list
curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/Debian_Testing/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null
sudo apt update
sudo apt install crystal
The following packages are not required, but recommended for using the respective features in the standard library:
sudo apt install libssl-dev libxml2-dev libyaml-dev libgmp-dev libz-dev
For Crystaline (language server), type:
mkdir -p .crystalline && cd .crystalline
wget https://github.com/elbywan/crystalline/releases/latest/download/crystalline_x86_64-unknown-linux-musl.gz -O crystalline.gz &&\
gzip -d crystalline.gz &&\
chmod u+x crystalline
In the configuration .JSON of VS Code, type the absolute location of the binary in the following field:
"crystal-lang.server": "/home/${USER}/.crystalline/crystalline",
For LazyVim, type:
touch ~/.config/nvim/lua/plugins/crystal.lua
And add:
return {
{
"vim-crystal/vim-crystal",
ft = "crystal",
},
}
Then, inside the file ~/.config/nvim/lua/config/lazy.lua
add:
{ import = "plugins.crystal" }
Go
At the moment of writing, the latest build was 1.22.0
:
cd ~/Downloads
wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
mkdir -p ~/.go
Add GO to your PATH
in `.zshrc`
:
export GOROOT=/usr/local/go
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
To check it, type:
$ go version
go version go1.20.3 linux/amd64
Rust
The best way to install Rust
on unix-like OS
, is to use rustup
from the official website:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
For future updates, you can use:
rustup update
For the sake of happiness, add this to .zshrc
:
# Rust
export PATH=$HOME/.cargo/bin:$PATH
Nim
To install Nim
, type:
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
Add to PATH
in .zshrc
:
export PATH=/home/$USER/.nimble/bin:$PATH
For language server in Nim, type:
nimble install nimlsp
Or, like this:
/home/${USER}/.nimble/bin/nimble install nimlangserver --accept
Scala
Install Java, with the snippet below or use Coursier
below:
sudo apt install default-jre && sudo apt install default-jdk
For Scala, type:
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
Add to .zshrc
:
echo "export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64" >> ~/.zshrc
Elixir
Just type:
sudo add-apt-repository ppa:rabbitmq/rabbitmq-erlang
sudo apt update
sudo apt install erlang erlang-dev erlang-dialyzer erlang-xmerl
And install Elixir manually.
At the time of writing, it was 1.17 and Erlang OTP 26:
wget https://github.com/elixir-lang/elixir/releases/download/v1.17.0/elixir-otp-26.zip
sudo unzip elixir-otp-26.zip -d /usr/local/elixir
echo 'export PATH="$PATH:/usr/local/elixir/bin"' >> ~/.zshrc
echo 'export MIX_HOME="$HOME/.mix"' >> ~/.zshrc
echo 'export PATH="$PATH:$HOME/.mix/escripts"' >> ~/.zshrc
mkdir -p ~/.mix
source ~/.zshrc
mix do local.rebar --force, local.hex --force
mix archive.install hex phx_new
mix escript.install hex livebook
Then you can install e.g. 1.16.1:
kiex install 1.16.1
echo 'source $HOME/.kiex/elixirs/elixir-1.16.1.env' >> .zshrc
Typescript
For Typescript, please type:
sudo apt update
sudo apt install nodejs npm yarn && npm install typescript -g
Or:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 22 && node -v && npm -v & npm install typescript yarn -g && tsc -v
Haskell
To install Haskell, the best is to just GHCup, which is a toolchain that installs GHC Compiler, language server and / or Cabal.
For Ubuntu, first install:
sudo apt install build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev
For Debian:
sudo apt install build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev
And then, finally install GHCup:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Dart
In order to install Flutter, type:
sudo apt update
sudo apt install apt-transport-https
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg
echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
sudo apt update && sudo apt install dart
Then add it to your .zshrc
:
export PATH="$PATH:/usr/lib/dart/bin"
Flutter
For Flutter use:
sudo apt update && sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
sudo snap install flutter --classic
flutter sdk-path && flutter --disable-telemetry
Mojo
To have Mojo, you need to register at Modular and then you will have something like this:
curl https://get.modular.com | \
MODULAR_AUTH=apikey \
sh -
Then just install Mojo
:
modular install mojo
Chrome
For Chrome, that is needed for Dart/Flutter/Android SDK, type:
su -
cat << EOF > /etc/apt/sources.list.d/google-chrome.list
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
EOF
wget -O- https://dl.google.com/linux/linux_signing_key.pub |gpg --dearmor > /etc/apt/trusted.gpg.d/google.gpg
sudo apt update && sudo apt install google-chrome-stable
Bonus
Jupyter
To install the Jupyter notebook engine, type:
sudo apt update && sudo apt install python3-notebook -y
To serve, type:
jupyter notebook
Jupyter Kernels
Ruby
For additional Ruby kernel, type:
gem install iruby
iruby register --force
Crystal
For Crystal kernel, please type
cd ~
git clone https://github.com/RomainFranceschini/icrystal.git
mv icrystal .icrystal
cd .icrystal
shards install
shards build
cd bin && ./icrystal register
DuckDB
For CLI, type:
wget https://github.com/duckdb/duckdb/releases/download/v0.9.2/duckdb_cli-linux-amd64.zip
unzip duckdb_cli-linux-amd64.zip
mv duckdb /usr/bin/
echo "export PATH="$PATH:/usr/bin/duckdb"" >> ~/.zshrc
source ~/.zshrc
For headers, used for example in Ruby, type:
wget https://github.com/duckdb/duckdb/releases/download/v0.9.2/libduckdb-linux-amd64.zip
unzip libduckdb-linux-amd64.zip -d libduckdb
sudo mv libduckdb/duckdb.* /usr/local/include/
sudo mv libduckdb/libduckdb.so /usr/local/lib
sudo ldconfig /usr/local/lib
gem install duckdb
Subscribe to my newsletter
Read articles from Mike Logaciuk directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by