Photo by Unsplash

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:
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.
# If we use 0.22.1 e.g:
# wget

Installing it using dpkg

Then you can use dpkg to install Debian packages
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


Written by Helmer Davila