Logo

dev-resources.site

for different kinds of informations.

Switching between multiple versions of various tools

Published at
12/15/2022
Categories
terraform
jdk
node
Author
luafanti
Categories
3 categories in total
terraform
open
jdk
open
node
open
Author
8 person written this
luafanti
open
Switching between multiple versions of various tools

I'm sure you've worked on different projects that used different versions of tools despite having the same technology stack. Whether you work as a frontend dev, backend dev, or DevOps, this problem can happen anywhere. Switching between versions of various tools can be tricky and painful. In this article, I decided to put together tools that will help reduce this pain.
I googled how to do it whenever I needed to switch between versions. This article I'll treat as a private cheat sheet. If you use the following tools on a daily basis, I encourage you to save this post and treat it as I do.


Switching Terraform version - tfenv

Installation

# Mac OS
brew install tfenv
Enter fullscreen mode Exit fullscreen mode

Basic commands

# list all installed terraform versions
tfenv list

# list all available terraform versions for installation
tfenv list-remote

# install selected terraform version
tfenv install 1.3.6

# switch to installed terraform version
tfenv use 1.3.6

# print currently set terraform version
tfenv version-name

# uninstall selected terraform version
tfenv uninstall 1.0.11
Enter fullscreen mode Exit fullscreen mode

Switching Java, Maven, and Gradle version - sdkman

Installation

curl -s https://get.sdkman.io | bash
source ~/.bash_profile
Enter fullscreen mode Exit fullscreen mode

Basic commands

# list all installed and installable versions
sdk list java
sdk list maven
sdk list gradle

# install selected version
sdk install java 17.0.5-zulu
sdk install maven 3.8.6
sdk install gradle 7.6

# switch to installed version
sdk use java 17.0.5-zulu
sdk use maven 3.8.6
sdk use gradle 7.6

# print currently set version
sdk current java
sdk current maven
sdk current gradle

# uninstall selected version
sdk uninstall java 8.0.352-zulu
sdk uninstall maven 3.6.0
sdk uninstall gradle 7.4

# list all tools whose versions sdkman can manage
sdk list
Enter fullscreen mode Exit fullscreen mode

Switching Node & npm version - nvm

Installation

# Mac OS
brew install nvm
mkdir ~/.nvm

# support for Oh My ZSH
echo "export NVM_DIR=~/.nvm\nsource \$(brew --prefix nvm)/nvm.sh" >> ~/.zshrc
source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Basic commands

# list all installed node versions
nvm ls

# list all available node versions for installation
nvm ls-remote

# install selected node version and switch to them
nvm install v19.2.0

# install latest LTS node version
nvm install --lts

# switch to installed node version
nvm use v19.2.0

# print currently set node version
nvm current

# uninstall selected node version
nvm uninstall v10.15.3
Enter fullscreen mode Exit fullscreen mode

I will expand this article when I discover other tools this type. If you use any other version management tools, please let me know in the comment, I'd be happy to take a look.

jdk Article's
30 articles in total
Favicon
Garbage Collection in Java: Progress Since JDK 8
Favicon
Day 5 - sudo,apt,jdk
Favicon
1.What is APT in Linux?2.what is JDK in Linux?3.what happened behind the screen, after we entering JavaC?
Favicon
Preparando o ambiente de desenvolvimento da melhor API de tabelas de campeonato que você já viu!
Favicon
Java Compilation Process : From Source Code to Bytecode Execution
Favicon
Java JVM, JRE and JDK
Favicon
Exploring the New Features of Java 23
Favicon
# Must-Know Features in JDK 23: What’s New for Java Developers? 🚀
Favicon
Enhancing Performance with Static Analysis, Image Initialization and Heap Snapshotting
Favicon
JDK Setup On Linux, Windows, Mac
Favicon
Memory Management in GraalVM Native Image
Favicon
Fundamental Questions of Java
Favicon
Tổng quan về công nghệ java
Favicon
El Anuncio de Microsoft: Microsoft Build for OpenJDK 21
Favicon
Using JDK21 Preview Features and/or incubator classes
Favicon
How to Install Java JDK 17 on Windows 10
Favicon
VSCode Java Extension Pack Auto Config
Favicon
How to install Java in Pop!_Os
Favicon
Getting Started with Java Programming: Downloading and Installing JDK and IntelliJ
Favicon
Como intalar o Java JDK 17 no Ubuntu 22.04
Favicon
Instalando o JDK 17 ou 21 no Windows 11
Favicon
Spring boot 2.7.7 application deployment on Glassfish 6.2.3
Favicon
Step-by-Step Guide to Migrating from Java 8 to Java 17 (or Later): Tips, Checklist and Best Practices
Favicon
Switching between multiple versions of various tools
Favicon
Encryption raised an exception
Favicon
Install Java JDK on Arch Linux
Favicon
JDK vs JRE vs JVM: Asosiy Farqlari
Favicon
JVM, JDK,JRE ve ClassLoader Nedir ?
Favicon
Change the default Java Version on macOS
Favicon
The state of pattern matching in Java 17

Featured ones: