As we continue to practice development for real world application, we will encounter a lot of different operating systems utilized. A lot of people use windows. It's what this generation grew up with and has a lot of awesome business application. But the world of Unix is growing continually and many companies employ it's systems for development. Mac and Linux are very closely related. I personally use Ubuntu for my work, but use a MacBook Pro for my actual professional job. A lot of what I will show you is going to be in the bash shell (standard with mac/linux). I don't want to limit my audience to just those users, so I figured that I would show you microsoft users how to utilize the linux shell without purchasing a new computer!
Option One: The Windows Subsystem for Linux (which is really, really, cool)The first way I will describe is with the WSL or Windows Subsystem for Linux. Their documentation is pretty solid and even goes a little further with launching a node app. But for the sake of imagery I will lay it out here.
- Open Powershell as an administrator and run the following:
- Open the Microsoft Store application and search for linux.
- Choose the distro you want (I like Ubuntu).
- Launch it and wait for it to install. Once ready, follow the prompt to setup your account
- Now, its installed. Check out your current directory by running:It should display /home/$yourUserNameHave some fun!Or maybe install python3 with apt!That's where i'm gonna leave it for right now. Lets take a look at another option that Mac users can employ as well!
Option Two: The Ubuntu Virtual Machine (Useful for many things, may be memory expensive and overkill for our learning usage)We are going to use a free Orcale VM program called VirtualBox to create a virtual machine and install any operating system we want (I am going to use Ubuntu, again).
- Let's first download VirtualBox from https://www.virtualbox.org/wiki/Downloads and then install it!It should open automatically, but if not, open it.
- Next, let's download our linux distro. You can use anything you like, but I like Ubuntu.
- Once that .iso file is downloaded, let's swing back around to VirtualBox and create a new VMclick "Add"Name the VM and select "Linux", "Ubuntu (64-bit)"Give it whatever RAM you can afford. If you don't give it some juice, it will run very slow.You can add hard disk space, (VDI)
- Now that we have created it, lets run it by double clicking it and install that ubuntu iso.
- Go through the install instructions and complete the process. You can now start this VM to use Linux whenever you want!There is always the option to partition your drive, but I would not recommend it if you are just starting out. I tried out the WSL and I love it. I suggest you start there.
Disclosure: scottyfullstack.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.