Installing Bat in Ubuntu Windows WSL

Installing Bat in Ubuntu Windows WSL

Downloading bat

I migrated to Windows and when I was installing Ubuntu through WSL I missed some tools that I have in my current MacBook, BAT was one of them. So as soon as I found a couple of guides online, here I will try to leave it as a reminder and with simple steps.

First, open your Windows Terminal (with Ubuntu) and search for the latest version on GitHub . It was 0.22.1 for me.

Then check if you have wget working. The most common way to do it is checking it with wget --version, else use the following script:

Terminal window
sudo apt-get install wget

Now you can download Bat with the following script, remember replacing VERSION by the latest version that you saw on Github.

Terminal window
wget https://github.com/sharkdp/bat/releases/download/v${VERSION}/bat_${VERSION}_amd64.deb
# If we use 0.22.1 e.g:
# wget https://github.com/sharkdp/bat/releases/download/v0.22.1/bat_0.22.1_amd64.deb

Installing it using dpkg

Then you can use dpkg to install Debian packages

Terminal window
sudo dpkg -i bat_0.22.1_amd64.deb

And that’s all, now you can use bat to see the content of your files inside the terminal.

My posts are not AI generated, they might be only AI corrected. The first draft is always my creation

Tags

Author

Written by Helmer Davila

In other languages

Descargando el instalador como paquete DEB

Instalando Bat en Ubuntu Windows WSL

Télécharger l'installateur comme un package DEB

Installer Bat sur Ubuntu Windows WSL

Related posts

A solution that tmux people will love

Tmux: Prefix Ctrl-Space not working on macOS