How to set up your Linux Environment – Part I

So I am a software engineering student at Flatiron School, and unfortunately we had to go remote due to the COVID-19. For the SE program full immersive on campus course they require you to use a Mac. Not a huge fan. So I had to rent a macbook air which wasnt bad for the purposes. Until we went remote. The overpriced hunk of junk was overheating and running ridiculously slow while in Zoom meetings, sharing screens, coding, etc.

I wanted to use my beast of a laptop for this program from the beginning but I knew that I had to set up a Linux environment. So here is how I went about doing that…

First off there are two ways you can do this. You can either Dual Boot Linux onto your windows(or mac -_-) or you can set up a virtual machine. I have tried both ways and I prefer the Dual Boot. That is what I will be going over today. Also I am using windows to dual boot.

Step 1

So you will need a usb flash drive that is > 25GB. We will be using this to make a bootable drive that will have Ubuntu 18.04 (linux) installed on it. You can download the latest version from here. Once that is downloaded and you have your USB drive you can download the Rufus tool to easily set up Ubuntu to be Bootable from your flash drive. You can get the tool and read how to use it (pretty self explanatory) here.

Step 2

Before going any further you can backup your current drive however this is widely tested and most people don’t have problems. Now you need to disable fast boot on your windows. You can do this by going to Power Options > System Settings > Choose what the power buttons do and uncheck the Turn on fast startup box.

Now we need to disable Secure Boot. If this sounds unfamiliar and risky to you, don’t worry its completely safe and is necessary for booting from the FLASH drive with ease.

So in order to do this in your search bar search “Advanced Startup Options”. You will want to select Restart Now and from there Select Troubleshoot>Advanced Options>UEFI Firmware Option Settings>Restart. You computer will restart and take you to the BIOS settings. Go to the Boot Tab and from there you disable Secure Boot.

You can now restart and log back into windows.

Step 3

We need to create HardDrive space for Linux. We are going to set aside a portion of the computers hard drive for this. Using the search bar, look up “Create and Format Hard Disk Partitions”.

You can select the partition that you want to set aside space from and you can click “Shrink Partition” and you can set how much space you want for Linux. I recommend at least 25GB but I put aside 100GB myself since it is where I will be doing all of my future projects. You will see Free Space in green once with the amount that you specified.

Now we are ready to boot up from our flash drive we made earlier with Ubuntu and install it on our computer. First we need to restart again and go into or BIOS settings to enable boot from flash drive. You can access the BIOS in a few different ways, it depends on your computer, but the most common way is to hit F12 or ESC or F2 at the start up of the computer.

You will see your BIOS Menu, go over to boot, and you should see your USB (it should be plugged in…) as a boot option. The menu looks like the image below.

Step 4 – Installation

Now it will boot from your flash drive and it will restart. It might sit on a black screen for a second but it will load up the Ubuntu Installation screen and will look like so…

You will want to choose Install Ubuntu with your preferred language and it will take you to the next menu. You will be asked to choose your keyboard layout, it is default to the U.S. layout but there is a list you can choose from. From there it will take you to the Installation Type.

Here if the option shows up for Install Ubuntu alongside windows 10, choose this option. This will make the installation very easy and most everything is done for you. You will just have to choose the partitioned memory that we set up early for the installation.

If it does not show up choose something else, and I will walk you through the steps. DO NOT choose Erase Disk and Install Ubuntu! If you do this you will erase the windows on your computer and you will only have Ubuntu OS on your computer. If you accidentally did choose this… lets hope you set up a back up or bye bye windows..

Now if you chose “Something Else” follow the next steps carefully. You will come to a screen where you will choose the partition of memory that you set up earlier. It will say “free space”. Something like this picture below…

Select the free space and then you’re going to want to select the “+” button. This will let us set up the Swap Area. The swap area is basically virtual memory. So if you computer ever runs out of memory or RAM, Ubuntu will use this extra memory set aside to help out. Once you click the “+” you will get a menu and you will want to put in an option of how much memory you want to set aside for the swap area. The general rule of thumb is to set aside 1x-2x of the amount of RAM that your computer has. So if you running 8bg of RAM you can put between 8-16GB aside for the swap area.

After you put in the size, remember 1000mb = 1gb, you want to make sure to choose “Logical”, “Beginning of this space” and on the drop down menu choose swap area. Then click ok. Next we will repeat this process but for setting up the rest of the allocated memory for the hard drive. So now your going to want to select the free space again and click the “+” button. You will get the same menu but you want to leave the “size:” at what it is at, because that is the remaining space after allocating your swap area. Choose “logical”, “Beginning of space”, and on the drop down menu select “Ext4 journaling file system”. For the mount point, select “/”; this is your Root directory.

Click ok and then you can go ahead and click “install now”. A menu will come up, double check to make sure you’re installing to the correct drive and then click “Continue”.

You will come to a screen to select your location, so go ahead and choose the time zone that you’re in. At this point you will come to a menu to custimize the name of your computer and set up your password. It will finish, and you will have to restart your computer. At this point, remove the USB so it wont boot from the USB. When it restarts it will come to the GNU GRUB interface menu. You can choose which OS to jump into. It will be Ubuntu on the top but you can always go down and select windows.

Now you’re ready to use Ubuntu! You will go through some “how-to” menus but you can skip all of that. Now we can get into the fun part. Lets set up your programming environment. Click the link to part 2 of this post to see how.

Continue setup with Part 2 here.

Also here is a YouTube resource for setting up Ubuntu in case you need a visual representation. I used this when first learning how to do this…

3 thoughts on “How to set up your Linux Environment – Part I

Leave a comment