You know how to whistle, don’t you? Just put your lips together and blow. Well installing WSL is nearly as easy and can up your efficiency and expand your toolset.
Throughout my career I’ve found myself constantly seeking more efficiency; Better, faster, easier ways to accomplish my tasks. I’ve found many tools and methods, and sometimes they’ve only been available for Linux. I’m comfortable with a command line, whether it’s Windows command prompt, Powershell, IOS/IOS XE/NXOS, and yes, even Linux amongst many others. I feel like my job has always required me to use some kind of Windows program so I’ve tried a number of ways to allow me to use both Windows and Linux tools. I’ve tried a multi-boot system where I could boot into either Windows or Linux, I’ve used a Mac (with its built-in Linux-like shell) running Parallels for my Windows programs, and most recently I’ve used Windows and connected to a virtual machine running Linux when I’ve needed to use those tools.
In all my workarounds though, there’s always been some kind of sacrifice whether it be partial functionality, the battle to securely get files from one system to another, or issues accessing systems when I’m working on location rather than from my office. Today I’d like to tell you about running Linux on your Windows machine and show you a couple Linux tools that might just change your life. The only sacrifice I’ve found is the laughably minimal disk space it takes up. Depending on your internet connection, you could be trying WSL in less than10 minutes.
Let me walk you through enabling Windows Subystem for Linux or WSL (It’s so much easier than you’d expect!)
Next, you’ll need to choose a distro. I believe Ubuntu is the most common right now, but Debian or Kali Linux are also good choices. I won’t go into any detail here on the difference between them, but I encourage you to try one out and feel free to learn as you go.
Now that you have your very own WSL running Linux, let me show you a couple of my favorite Linux tools. It’s worth noting that when you go into the WSL CLI, it shows you the path you’re currently in which is /mnt/c/Users/[your username]. Your Windows C drive was mounted to Linux as /mnt/c so you can access any files on your computer and use the built-in or added in Linux tools with them.
Grep is my favorite search tool. I am admittedly a total noob because it has so many options and more functionality that I’m not familiar with yet, but let me introduce you if you haven’t used it before. It is so much faster than Windows search when I’m looking for something in logs or other files. To use it, you call grep, pass any options, then specify one or more files to search through. I’ll be passing ./* which specifies all the files in the current directory.
Nano is an easy to use command line text editor (manual available by typing ‘man nano’). You can use it to create or modify text files. Because it’s command-line based, it uses all keyboard commands and can be a lot faster than notepad for text editing. There may be a bit of a learning curve, but I think in the long run it has saved me a LOT of time. If you’re feeling REALLY adventurous, try vim or vi which is like the notepad++ of command line text editors.
Less is another command line search tool that I use for logs when I’m not positive what I’m looking for that lets me quickly peruse and search (manual available by typing ‘man less’). You just type ‘less [filename]’. Once you’re in a file, you can hit ‘h’ to show help, search for text, open multiple files, search and navigate. This is another tool that I think pays dividends in invested learning time.
I hope someone finds this useful as it has really simplified my work and I wanted to share. It is unbelievably easy to get started with and provides SO much value in my opinion for so little work. I’d also like to publicly thank the person that shared it with me (you know who you are).
LookingPoint offers multiple IT services if you’re interested. Want more information, give us a call! Please reach out to us at sales@lookingpoint.com and we’ll be happy to help!