DEV Community


Posted on

Setting up a Coding Environment in Windows

Hi folks, let’s talk Operating Systems!
I guess introductions are in order, so let’s introduce the Operating System.
Operating System or OS is installed on a computer and acts as the manager of the computer’s resources. Its main functions include managing those resources, allocating them to specific programs whenever necessary to perform a particular task, and establishing a user interface.

Some Operating System History

1950s - General Motors Research Lab implemented the first OS for their IBM 701.
1969 - Unix was developed at Bell Labs by Dennis Ritchie and Ken Thompson.
1981 - Microsoft markets DOS after it purchased 86-DOS software from a Seattle company.
1984 - Apple creates a Graphical User Interface paired with a Unix-type OS.
1985 - Microsoft launched Windows when a GUI was created and paired with MS-DOS.

Alt Text

Both macOS — the operating system used on Apple desktop and notebook computers — and Linux are based on the Unix operating system.
Like all major Linux distributions, such as Ubuntu, Red Hat, and SuSE Linux, macOS offers a desktop environment that provides a graphical user interface to application programs and system settings. This desktop environment is built on top of a Unix-type OS just as the desktop environments of Linux distros are built on top of the core Linux OS.

Alt Text

The practical aspect of the common roots of Linux and macOS is that both follow the Standard created for all Unix-like Operating Systems. This compatibility makes it possible to compile applications developed on Linux, on macOS systems. Like Linux distros, macOS includes a Terminal application, which provides a text window in which you can run Linux commands. This terminal is also often referred to as command line, shell, or shell window. It's the text-based environment that people used to operate computers before the graphical user interface became available. The popular Bash shell is available in macOS as it is in most Linux distributions.

Alt Text

That is why a macOS’s terminal app, integrated with github and a text editor of your choice, will provide an easier to setup, environment for us to start coding with.
Recently I had to setup such an environment for coding, when I joined a rather dysfunctional assortment of characters, calling themselves ‘CodeBenders’, but more on them later.

As a user with 85% Windows - 12% Unix-Linux and 3% macOS experience, having to do that on unfamiliar territory proved to not be as pleasant as I had hoped.

Alt Text

Analytics data for 2019 show that about 88% of Desktop/Laptop computers worldwide, run Windows, about 10% run macOS, the other 2% run Linux or some other kind of OS. If you like me, are part of that 88 percent and you prefer the OS you are most familiar with, stay tuned and we’ll walk through some of the most important steps you need to pay attention to, together.

Alt Text


Windows's Command Prompt tool works on its host file system and its not compatible with what we will be running on it. We need another Terminal Application that will be compatible, like a Terminal that will point to a Linux kernel.
Windows has a feature installed but not enabled by default, Windows Subsystem for Linux or WSL, it acts as a virtual temporary environment in which Windows 10 installs a Linux distribution, or ‘distro’ for you. So all we have to do is enable it, in Windows features options for your system.
You visit the Microsoft Store and from a selection of Linux distributions you pick the one you want, download free of charge and install. Windows will guide you through the process and when it’s done you’ll have access to a fully functional terminal of a Linux kernel!

Setting up everything else is exactly the same as the macOS environment setup. Install the editor of your choice and integrate it with your wsl terminal, integrate your sql adapter, github, learn accounts and you are all set. Manipulating the .profile or .bashrc files depending on the Linux distro you chose, for customization of the terminal or to have an authenticated ssh agent running as soon as you open your terminal, is a breeze.

Some things to keep in mind

Windows and Linux file systems are not compatible, WSL will save some important files in your Windows with the installation files of the Linux distro, but your projects will be stored in your Windows file system.

A very good alternative to using git commands in the terminal, is the Desktop Application Git provides for its users, Windows and macOS versions are available. The App itself is very light in resource usage, it has a delightful Graphical Interface and is very user friendly.

Look, CodeBenders mostly are thoughtful folk, so I will not leave you without some great news!

Microsoft recently made WSL 2 available

Main upgrades from WSL include the usage of a Virtual Hardware Disk (VHD) to store your files, Linux system can dynamically allocate Disk space as needed, it will also allow you to place files that your Linux apps will access, in your Linux root file system for faster file performance speed. Because of the new features when starting, WSL 2 will now use a small proportion of memory, so lesser impact on you system's resources.

A few important notes here are

WSL 2 is only available in Windows 10 builds 18917 or higher.
You will need to make sure that you have both the Windows Subsystem for Linux and the Virtual Machine Platform optional components installed.

I Will be testing WSL 2 first chance I get, so stay tuned for any updates and news from CodeBenders!
Have a Great Day folks!

Top comments (0)