Install mise on Ubuntu 24.04

Install mise on Ubuntu 24.04

The mise is a tool version manager designed to simplify the management of multiple language environments by replacing tools like asdf, nvm, pyenv, and rbenv. This tutorial demonstrates how to install mise on Ubuntu 24.04.

Install mise

Check the newest mise version from its GitHub repository and set it to a variable:

MISE_VERSION=$(curl -s "https://api.github.com/repos/jdx/mise/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Download executable to /usr/local/bin directory:

sudo wget -qO /usr/local/bin/mise https://github.com/jdx/mise/releases/latest/download/mise-v$MISE_VERSION-linux-x64

Set execute permission:

sudo chmod a+x /usr/local/bin/mise

The mise activate is one way to set up the mise. This command can be set in ~/.bashrc file:

echo 'eval "$(mise activate bash)"' >> ~/.bashrc

This adds the necessary configuration to the .bashrc file, enabling mise every time you open a new terminal session. For changes to take effect, either log out and log back in, or apply them immediately to the current session with the following command:

source ~/.bashrc

Verify the installation by checking the mise version:

mise --version

Testing mise

Once the mise is ready, you can install various programming languages. For example, to install latest Go version, use this command:

mise use -g go@latest

Confirm the installation by verifying the Go version:

go version

Uninstall mise

Remove entry from ~/.bashrc file:

sed -i '/eval "$(mise activate bash)"/d' ~/.bashrc

Now, logout and login to the system. Then, remove mise executable:

sudo rm -rf /usr/local/bin/mise

We can also remove the configuration files, cache, and development tools:

rm -rf ~/.config/mise
rm -rf ~/.local/share/mise
rm -rf ~/.local/state/mise
rm -rf ~/.cache/mise

Leave a Comment

Cancel reply

Your email address will not be published.