How to install Homebrew using Ubuntu with Windows 10

Install Brew on Ubuntu with Windows10

The complete documentation with code

Windows Subsystem Linux is the helper in this tutorial and image!

Alright you crazies. I’m going to walk you through how to install Homebrew or “Brew” using your machine Windows.

**Before attempting this tutorial, please be sure that you follow the instructions correctly, as you nay cause unintended alterations to your computer. Save all files currently open as well.**


Well yes as a matter of fact, Windows users can now support Homebrew due to the magnificent recent release of Homebrew 2.0 ! This awesome update initialized the official support of “Linux” and “Windows 10” through. WSL So now that you are up to date, Lets Get It Crackin!

#1: You need to Enable the WSL

Alternative to the keyboard shortcut, this will be the expanded version

Starting from the Windows Desktop, you will run this shortcut with the following keys Win + r then press enter.

Inside this new window that popped up you are going to scroll and find the feature called “ Windows Subsystem for Linux and select the checkbox, and then yo- WAIT!

After you machine will prompt you to restart. So At this time this is your chance to make any saves to files or pages you currently have open outside of the ones in use for this tutorial.

Once you’re ready to proceed, CLICK OK .

ALTERNATIVE: Start button>search for “Turn Windows Features On and Off”> Click on the file icon/the gear icon> (this will not open the control panel, only the Windows Feature modal).Select Windows Subsystem Linux>OK

When the update to your software is completed, head on over to the Microsoft Store and search for Linux. Once loaded, you’ll see a list of distros to choose from. ( Kali, Ubuntu, Ubuntu LTS, and Debian)

Make sure you chose Ubuntu and download/get. This can take a moment to install so be patient.

After its install is complete you will be prompted to create a user account as well as a password (whatever you are typing you will NOT see.)

Once this step is complete, the entire command line (Ubuntu shell) will open up, which will be the bash shell for the Ubuntu application.

THAT WAS EASY!

To VERIFY that you are running Linux bash shell in windows enter these commands: which $SHELL , uname -o , or ls -al /

Install & Configure Brew

In the command line, type/copy the following to install brew as Linuxbrew:

sh -c “$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)”

Linuxbrew will install packages to home/linuxbrew/.linuxbrew/bin , therefore you will need to manually add that directory to your PATH. Which also means, you won’t have to use sudo to use brew.

Run this list of commands:

echo “eval '\$($(brew –prefix)/bin/brew shellenv)” >>~/.profile

test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)

test -d /home/linuxbrew/.linuxbrew && eval $(home/linuxbrew/.linuxbrew/bin/brew shellenv)

test -r ~/.bash_profile && echo “eval \$($(brew –prefix)/bin/brew shellenv)” >>~/.bash_profile

And you’re finished!! Now you are able to use brew!

Vivaldi