Creating an Awesome Windows 10 Dev Environment

Creating an Awesome Windows 10 Dev Environment

Developers use Macs! At least.. that’s what a lot of people believe. But Windows 10 can be a great development environment too!

I only really started my computing journey in the early 00s, but I’ve used a bunch of Operating Systems since then and currently use Windows 10 as my daily driver. I’m much more used to Linux/Unix, when I was 13 we got our first computer with little to no knowledge of what we were buying… ending up with what looked great in the catalogue (bonus points for being bundled with a printer and a scanner) as opposed to what had the best specs. A few years later I soon discovered my PC was not powerful enough to keep up with Windows XP let alone upgrade, so I opted to switch to Debian Linux instead of upgrading to Windows Vista.

Linux was painful then, I had to compile a lot of drivers from scratch and there weren’t as many resources or tutorials available to navigate. Even so, it gave me so great experience with using the Bash Terminal and getting used to working without a GUI. I eventually ended up on Mac OSX and continued on Mac Hardware until around 2020. When I joined Microsoft as an Employee I felt it was time to give Windows another chance and purchased a PC – 8 months on I thought it’d be useful to share some tools and tricks I’ve picked up along the way.

My Setup

I’m currently using a Desktop PC with an i5 2.9ghz Processor and 16gb RAM. I have this paired with an Nvidia GeForce RTX 2060 graphics card and two 32” 4k curved monitors. Note that I run the Dev version of Windows 10 Pro, as a Windows Insider, so some things you see in this article might not be available in general release yet.

My Desktop      

Just before I start… Aesthetics. Not really key to a dev desktop experience but it helps! My desktop currently looks like this:

No alt text provided for this image

I’m a big fan of the Bing Image of the Day and set my wallpaper to automatically refresh with the image of that day. To do this I’ve used Dynamic Theme available for free (although try to support the developer with a cup of coffee!) which will refresh both the desktop and lockscreen backgrounds. I’ve also set my accent colour to be Automatic in my colour settings meaning it’ll pickup the primary colour of my daily background:

No alt text provided for this image

I use another third-party tool, Auto Night Mode available on Github to automatically switch Windows from light mode in the day to dark mode at night. I’m not sure why this isn’t available by default as it already features on MacOS and GNOME Shell for instance, but this provides a pretty stable alternative:

No alt text provided for this image

Finally, I’ve never been a fan of the Windows Taskbar personally, I feel it looks a bit clunky and dated (maybe because I still associate it with Windows 95!) I’ve made a few changes here:

  • My taskbar runs vertically down the left hand of my screen. With a widescreen monitor and such a high resolution, this feels better than have it span the entirety of my monitor’s width.
  • I’ve used TaskbarX to centre my Taskbar icons
  • I use TranclucentTB to get a near-see through taskbar. (Technically Taskbar X can do this, but Windows Preview builds seem to break this function)

The result looks like this (cropped for better web reading):

No alt text provided for this image

My Go-To Dev Tools

I should preface this with an explanation of what I mean by ‘Dev’. Anyone who needs to write scripts, work with a terminal or interact with anything using a shell/code/non-gui interface should benefit from this list. It doesn’t matter if you’re a DevOps Engineer, Software Developer, DBA or other.. hopefully there’s something here for you to benefit from!

WSL(2)!

YOU CAN NOW RUN LINUX ON WINDOWS! Windows Subsystem Linux gives you the ability to run Linux Distributions from within Windows Itself. To get started simply find the Linux Distribution you want to use in the Windows App Store. I went for Ubuntu just because it’s probably the most well-known and user-friendly Linux Distribution out there.

No alt text provided for this image

You can install more than one distribution, I’ve also installed Kali-Linux with the intention of exploring some of it’s more security focused tooling… although I’ve never got round to it. The distribution will appear in your start menu:

No alt text provided for this image

And clicking on it reveals a Terminal

No alt text provided for this image

So what can you actually do with this?

Effectively anything that you can do with a Linux Terminal. All native Bash commands like find and grep work as do functions bundled with most distros such as git and ssh/scp. You can install additional applications using your distributions package manager, in ubuntu’s case… Apt.

For hardcore users, I can confirm that this does mean you can use VIM on documents stored in your Windows System.. if only I could remember all of those keyboard shortcuts!

No alt text provided for this image

Oh-My-ZSH

OK so we now have Linux running within Windows, giving us access to Linux commands within our Windows OS and allowing us to manipulate Windows files with native Linux tools. For added productivity I’d recommend considering switching from BASH to ZSH. Oh-My-ZSH offers a load of features ontop of ZSH itself.

There are plenty of articles on why, such as this one here, so I won’t go into it too much but Oh-My-ZSH gives you plugin and theme support, better completion and spelling correction alongside a load of other benefits.

To setup ZSH on Ubuntu run the following commands

sudo apt update

sudo apt install git zsh -y

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

That’s it! Opt to set ZSH as your default shell and off you go.

I personally use the Powerlevel10k theme which is often ranked as one of the best, you can get it here.

No alt text provided for this image

WSL(g)

Finally, for Linux… Windows Preview builds of 21390 and higher give access to WSLg. WSLg allows you to run Graphical Linux Applications within Windows really feeling like the final piece for providing a seamless experience between Windows and Linux.

To enable this, make sure you’re running WSL2. You can check this with the command:

wsl --list -v
No alt text provided for this image

If you find any of your instances are running WSL Version 1 then you can upgrade them by using:

wsl --set-version NAME 2

WSLg should just work but there are some dedicated video drivers you can download to help WSL get the best performance out of your graphics card:

NVIDIA, AMD, Intel

I personally haven’t found much use for WSLg yet… although it’s nice to complete the set and have a fully working and visual Linux environment running side by side with Windows. If you need to use some specialist Linux tools, work with something like Audacity or build some more advanced applications then WSLg may prove useful. As the applications have access to all Windows Resources, including your Graphics card for acceleration then it should be as powerful as running on a dedicated Windows Machine.

To prove this works, here’s Nautilus running side by side with Windows Explorer displaying the same directory!

No alt text provided for this image

Windows Terminal

I honestly don’t know why this isn’t included in Windows by default but it’s a massive change for the Windows Experience.

I get it… whenever someone says ‘Terminal’ or ‘Command Prompt’ I throw up a little. Previous experiences on Windows haven’t been great in any department but “Windows Terminal” goes a long way towards fixing that. I’d go as far as saying Windows Terminal is probably the best Terminal experience I’ve had… ever!

You can download Windows Terminal from the Microsoft Store here.

What’s so great about it? Well, when you open Windows Terminal it’ll launch a Powershell Session – albeit looking a lot nicer without the weird blue background:

No alt text provided for this image

Click on the down arrow next to the new tab button and you’ll get multiple options

No alt text provided for this image

Here you can launch a Powershell session, Command Prompt, WSL or Azure Cloud Shell all within the same terminal. Multiple tabs are supported so you can have them side by side. So you can be working on your local machine using BASH commands in your WSL instance and then directly next to it interacting with Azure via Azure Shell

No alt text provided for this image

As a bonus, when you launch a Linux instance through Windows Terminal it’ll automatically jump to your Windows home directly (or My Documents) allowing you to directly edit any Windows files you might be working on.

Windows Powertoys

Powertoys are available here and provide a few extra utilities to customise Windows 10. There’s a zone window manager, Rename Tool and Keyboard Manager for instance.

I use two tools quite regularly

Powertoys Run – the only tool I’ve seen that really provides a replacement for Mac’s Spotlight Search. Much like spotlight which is invoked by Cmd+Space, Powertoys Run appears with Windows+Space.

You can use Powertoys Run to launch applications, search through running processes and run basic commands like calculations

No alt text provided for this image

Colour Picker – I’m colourblind and sometimes struggle to identify colours. Colour Picker in Powertoys allows me to launch a quick and simple colour identifyer using Windows+Shift+C. For bonus points, it tells me the hex code if I wanted to work this into any CSS I may be creating.

No alt text provided for this image

Robo3T

When developing modern web applications, my data store of choice will always be NoSQL/MongoDB. Sometimes it can be a pain to query or visualise NoSQL Data, yes you can use the command line but often I just want something quick and visual.

Azure’s CosmosDB with the MongoDB API is my NoSQL DB of choice and the Azure Portal does come with a web based data visualisation tool. I prefer something on my desktop though, which I’ll often run next to Visual Studio Code or similar.

Robo3T has been my tool of choice for a while, mainly for its features and simplicity. It’s free so give it a try. It’s a MongoDB Tool but as Azure’s CosmosDB can run with the MongoDB API, it works great with Cosmos too.

No alt text provided for this image

Portainer

Not strictly a Windows thing, just something I have been running in my dev environment for a while now. Portainer is a visual, web based, management console for all things Docker. You can download images, spin up containers, see the status of existing containers and even start a web-based shell session directly into a running container.

I don’t need a full blown Kubernetes environment on my own machine, I just need the capability to run containers – both for testing and usability reasons. Portainer gives me an easier way to manage containers without having to resort to terminal commands. I know Docker Desktop can offer something similar but I honestly find Portianer to be a lot easier and more powerful.

As a bonus, Portainer is available across your network on localIPAddress:9000 so if like me you opt to have a dedicated Docker host, you can manage your containers from any device.

No alt text provided for this image

Portainer runs in a docker container itself and is fairly easy to install. You can get it from Portainer.io and there are Deployment commands available in the Docs for installing either on WSL (recommended) or Windows Container Service:

Docker - Documentation (portainer.io)

Visual Studio Code

Finally, no Dev Environment post would be complete without mentioning Visual Studio Code. I’m not going to write much because, VS Code is honestly one of the best if not the best modern IDE available – especially for scripting or modern web development.

I may write another post about my top VS Code extensions, integrating it more deeply into WSL, or deploying directly into Azure from VS Code… but for now here’s a list of some great extensions you can read about and install right now:

Best 15 vscode extensions for developers | 2021 | Free (edvicehub.com)

theEnd()

If you’ve made it this far then well done, that was a lot of text!

If you want to chat about anything I covered, send me a message here on linkedin or feel free to email me on [email protected]. I’d love to hear if I’ve made you aware of anything new that you’ve ended up using in your daily dev setup!

Arman Parsa

Lead Data Consultant

3 年

Great article Steve!

要查看或添加评论,请登录

Steve Chan的更多文章

社区洞察

其他会员也浏览了