Switching to Ubuntu from Mac
Tags: ubuntu
Published: 2020-07-24 10:50:56

> As frontends, It’s time for us to move on into something better… bye-bye, macOS!

#Why on earth would you do this?
Well, let’s start with I used to have a MacBook Pro (15-inch, 2017) at work, not the greatest piece of hardware ever produced by Apple, but at some point, I was “[ok](https://www.macworld.com/article/3385043/apple-apology-macbook-keyboard-butterfly-fail.html)” for me to work with it only when I purchase a Magic Keyboard and Mouse.

Then during the lock-down period here in Berlin, meanwhile I was on “Home Office”. During zoom meeting all of a sudden, my webcam turn off and a burned pixel line appeared on the display, dividing it into two parts; which of course was really annoying to look. A couple of hours later on that day, the screen just stopped to work and only had a black screen.

And just like that, I was another victim of the “[Flexgate](https://www.macrumors.com/guide/flexgate-macbook-pro-display-issue/)”, but with a micro-crack alongside on the display (which I found out some days later, during a careful inspection at an “Apple Autorisierter Händler” here in Berlin) took all hope of getting this mac repair free of charge. Instead, I got an estimation of the repair cost of more than 1.500€.

Long story short, I got a brand new [Dell XPS13 i7–10510u](https://www.dell.com/de-de/work/shop/dell-notebooks/xps-13/spd/xps-13-7390-laptop/bnx73925) with Ubuntu 18.04. So at first, this reminds me of my good old days at the university, when we used to use [Fedora](https://getfedora.org/); not completely unfamiliar with a Linux distribution but still. Some research was needed.

As a result of all that, I gather around some info which I’ve tried to summarize it, into these 3 simple steps:

##Step 1 —Get down to the basics
"[Upgrade to Ubuntu 20.04 LTS](https://www.omgubuntu.co.uk/2020/04/how-to-upgrade-to-ubuntu-20-04)", then after that.

Open your command line, if you want to improve your command line skills I can recommend you this article “[15 Essential Linux Command Line Tips and Tricks](https://medium.com/better-programming/15-essential-linux-command-line-tips-and-tricks-95e2bfa2890f)” 

`sudo apt update && sudo apt upgrade`

For the ones that are not familiar. Snap as is defined on their documentation is a software deployment and package management system. The canonical way for Mac’s app store.

Besides all the [controversy](https://thenewstack.io/canonicals-snap-great-good-bad-ugly/) that Snap is generating, I still believe is a great way to manage packages, especially for its self-contained structure, which gives a convenient way to install and manage complex packages dependencies.

Here is how we can install it:

`sudo apt install snap`

From my short experience on the subject I can suggest installing the following:

`sudo apt install curl build-essential git postgresql postgresql-contrib`

##Step 2 — Here comes NVM
The tricky and funny part related with Snap is something I found while using it at work with my current projects when you install [node with Snap](https://snapcraft.io/node), it generates found out that by using it on a container I will generate some problems related with

```
npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/2494/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with
```
I found that the best solution to have a stable node installation is to first [use NVM](https://github.com/nvm-sh/nvm#installing-and-updating)

`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash`

After installation, just close the terminal and open a new one and try to verify again the installation.

To install node you can check on NVM:

`nvm list-remote`

and install the version of your choice, on my case the current version (14.5.0)

`nvm install v14.5.0`

##Step 3 — Just snap of a finger
After you install all your favourite global dependencies, We can go back to be friends with Snap and proceed by installing your most beloved apps.

On my case:

`sudo snap install gitkraken go multipass kotlin postman vscode intellij-idea-ultimate --classic`

also to be considered some personal favorites:

`sudo snap install altair termius-app beekeeper-studio nordpass gifex standard-notes vlc`

#Conclusion
That’s it! some weeks of full immersion in the Ubuntu world. 

I believe there’s no going back for me, especially because I got this feeling of full control of my Developer Environment; not that I didn’t have it with macOS, but lately especially after I upgraded to Mojave, I was having many issues with my configurations on Proxy, filesystem and so on... But enough of my shenanigans.

Hope you like my first ever article here; soon more to come! please if you have any suggestions, critics or questions just leave your comments below. I’m pretty sure this content can be useful for many; so your feedback will be much appreciated.

:)

##Happy Coding!