HOW TO SETUP YOUR MAC FOR CODING
Published: 2023-04-13 00:18:39

The first thing you need to do is install the packages from HomeBrew

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ew0znwxfdzk8ituz8k3q.png)

Homebrew is a package manager for macOS that provides a convenient way to install open-source software, command line tools and many more.

The first thing you need to do is of course to open your terminal in macOS machine.

Click on your keyboard command+space

Then the spotlight search will pop out
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kcwxmrx8tudd71ydim46.png)

Type the word (terminal) to the search bar in order to access the terminal of you machine

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ab3w7nr7vksj2ulnag7m.png)

Click the terminal 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f14to9rb3msmsqpz4op1.png)

This is what a terminal looks like in macOS machine

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0lh59pxfjjfg0otjsgb.png)


With this single magic of command code of HomeBrew:

**/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"**

you were able now to install open-source software, command line tools and many more.

Copy the command code of HomeBrew to your terminal and hit ENTER

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzfqml2qp2x88gzpgihk.png)


You need to put the password of your macOS machine in order to continue the installation of HomeBrew to your system

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tkpbwp1a3dskvnjsmasi.png)

After you put your password this will happen

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84yuvb040rl3cre83ahc.png)

Just hit ENTER to continue the installation of Homebrew

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ap2b9qi6kq8dqfyt9okb.png)

Now the HomeBrew is installed on your machine


To check the version or if it installed successfully to your machine, type this: 

brew --version

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shhjqh7ry97n2xw7nv2l.png)

Now as you can see I have successfully installed the brew with version 4.0.13


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzjupgjaqy9e396kamsb.png)



Let us now try to install some packages through HomeBrew in the terminal

Just type in your terminal :
brew instal (following the package that you wanted to download/install in your system)


Let us have here an example:

For example I want to install php in my machine then i just simply type to the terminal: 

brew install php


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kdvjhxctge0m3lx4ohi2.png)

As you can see in my case that php is installed on my device

Now we wanted to check if it is really installed to our machine, we can just also simply check its version


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z8v9gj19yn1gcekxn66n.png)

You just need to repeat the process
Just type in your terminal :
brew instal (following the package that you wanted to download/install in your system)


Now let us now install the IDE that we will you use for coding

We can also download it through HomeBrew

For example i want to install/download visual studio code

I just simply type:

brew install visual studio code

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ok7cn99ue3rpq922dv3z.png)

As you can see there are similar packages to it, in order to choose a certain package you need to use --cask to select a certain package


For example is: brew install --cask visual-studio-code

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ps9mipnu0cz4reojca9.png)

Now as you can see I have successfully install Visual Studio Code on my machine


![Visual Studio Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldii603arcv658vmflpv.png)

That is the magic of HomeBrew

Happy Coding Everyone!