Goals
It’s been literally decades since I’ve owned a Windows machine; here’s a guide to setting up Windows 10 and getting orientated for those used to doing things the MacOS/Linux way. Some specific goals include:
- Initial setup
- Backups
- Install winget package manager
- Install WSL2 and Ubuntu
- Install terminal
Initial Setup & Orientation
The most important tools and short cuts for navigating round my Mac, and the W10 equivalent, are:*
CMD+Tabto switch programsALT+Tab
- Cycle through programs (with
CMD+Tab) to get to Finder- Unlike Finder, which is always open on a Mac, File Explorer is not necessarily open. So to get to it fast, I use
WIN+Nwhere N is the position of File Explorer in the Taskbar; I like to keep it at the first position, so WIN+1 does the trick
- Unlike Finder, which is always open on a Mac, File Explorer is not necessarily open. So to get to it fast, I use
CMD+`to cycle through windows- Unfortunately, although lots of places online claim that the combo
CTRL+` will cycle through windows of the same program, I have not found this to work on my W10M. The best way I have found to achieve this is to use theWIN+Ncombo where N is the position of the program in the taskbar. If you have a program with two or more windows open, then repetitions of theWIN+Ncombo for that program will cycle through its windows. Since it is almost always the browser or File Explorer that has lots of windows open, I make sure to place these programs near the beginning of the taskbar.
- Unfortunately, although lots of places online claim that the combo
CMD+zxcvwqasto perform “classic” short cut operationsCTRL+zxcvwqas
CTRL+CMD+left/rightto move between tabs within Browser- CTRL+Tab, or
CTRL+PageUp/PageDownin Edge
CMD+left/rightto move cursor to beginning/end of lineHome/End
Shift+CTRL+3/4to take a screen shotWIN+Shift+Sto open screen shot wizard; your image will initially be copied to clipboard; to save it to a file, you need to click on the pop up icon of that image and save it proper.
Additionally, when we use ALT+Tab, we do NOT want to see all the various Edge browser tabs as this makes the visual field overwhelming. So we go to Settings > System > Multitasking and below the “Alt + Tab” section, choose “Open windows only” from the drop down menu.
Windows File Structure
The main difference between the W10 file structure and that of Unix is that, with Unix, everything is container within the root file '/'. With W10, each storage device gets assigned a letter, and then it acts as the root of its own file system. For a decent quick reference of the similarities/differences see here.
The other thing worth nothing is that the W10 File Explorer is a bit fiddly in so far as it does not readily provide a clear representation of the file structure; rather, it wants to provide you with a bunch of options to find useful stuff. However, IMO, I’d prefer a simple tree-structure nested menu set up. I can get somewhat close to that by going to View > Options > Change Folder and Search Options > View and then checking/unchecking the following:
- Checked
- “Display the full path in the title bar”
- “Show hidden folders, files and drives”
- “Show all libraries”
- Unchecked
- “Hide empty drives”
- “Show all folders”
In the General tab, I also like to apply the “Single click to open an item” option.
With these options applied, the File Explorer provides a fairly intuitive representation of the nested file systems. The only “quirk” is the entry labelled “This PC”. When selected, you don’t see a bunch of nested files/folders as is otherwise the case, rather, you see two sets of icons labelled “Folders” and “Devices and Drives”. The former lets you jump straight into the user’s private data, the latter let’s you go to the root of a file system on a physical device. Although this is arguably inelegant in that it disrupts the simple pattern of having every view a simple snap shot of a level within a nested structure, I can see that its purpose is well intentioned and that I can live with it.
Installing Windows Subsystem for Linux 2
There are two ways to install Windows Subsystem for Linux 2 (WSL2). The “simpler way” is to sign up to the Windows insider program where you get to install the latest non-stable version of W10. If you’re not willing to share your usage diagnostics with Microsoft or risk non-stable releases, then you need to do the following (based on this article) to enable WSL2. First, open a Powershell prompt with admin privileges and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Then this to enable virtual machines on your W10M:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
… then restart. (Note: when I tried this my computer stalled on reboot; but it seemed to work after a further power-off-on cycle.) Next, download this WSL2 kernel update installer and run it, and then run this command to make WSL2 your default (as opposed to WSL1, I guess):
wsl --set-default-version 2
If you now run:
wsl --list --verbose
… then you’ll be told that:
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
So go to the Store and install the latest release of Ubuntu and, if you haven’t done so already, the new W10 Terminal. Now start/restart the Terminal and you can expect to find the option to start a new tab with the Ubuntu shell prompt. Run the usual:
sudo apt update -y
sudo apt upgrade -y
… and you’re up to date and ready to go with WSL2!
WSL2 Ubuntu Configuration
OK, now that we have a bash shell working in Ubuntu, we want to be able to configure it nicely. In order to configure my working unix shells, I maintain an easy-to-install CLI called “myconfig” that you can see here. This allows me to quickly install up-to-date versions of tmux, vim, zsh, oh-my-zsh, nvm, powerlevel10K, etc., and to thereby enjoy a slick-looking shell experience packed with useful aliases, shell scripts and other tools.
Anyhow, I was pleased to discover that my myconfig CLI has worked very well to date on WSL2 Ubuntu. The only extra thing I needed to do to get a nice zsh shell working was to configure the fonts for Powerlevel10k (P10K) to make the command prompt look snazzy. To do that, you need to manually download the four files specified in the P10k instructions to your W10M.

Then double click on each file to open it and then click “install”.

Then you need to press CTRL+, in your W10 Terminal app in order to open up the settings. These settings are configured as a JSON file, so you might need to specify the first time you open it that you want to open it in a text editor like notepad.
Once open, find the section labelled “defaults” where you can specify the default look of the different shells available within Terminal, and add an entry telling Terminal to use the fonts we just installed to the W10M. (FYI: by installing these files, you cause them to be system-findable within C:\Windows\Fonts\MesloLGS NF .)
"defaults":
{
// Put settings here that you want to apply to all profiles.
//DWD ADDED
"fontFace":"MesloLGS NF"
}
And, presto, your Terminal will now have nice modern fonts applied that make P10k look fantastic. (If, unlike me, you don’t have P10k installed by a self-maintained CLI like myconfig then of course you’ll need to follow the instructions to set it up.)
Again, nice work Microsoft, I honestly expected the Terminal to have rock-bottom 80s-level support for aesthetics.

WSL2 SSH and Daemon Services
What about running background services like an apache server from WSL2? One difference we have with WSL2 is that Ubuntu is not initiated with systemd, so to start/stop services, such as apache, you need to use the older syntax of e.g. sudo service apache2 start.
sudo /etc/init.d/apache2 start
Of course, you need to ask yourself how you plan to use your W10M. If you plan to run something like a production server on it, then you also need to worry about things like restarts when you are out of town, forwarding requests between W10 and WSL2, etc. I am not going to explore that sort of thing now, but will make a note of this article and this article in case I do in the future.
However, I will briefly cover ssh since, IMO, it’s not fun having to work directly with the W10M to accomplish something when I can work from a laptop.
The best/simplest approach I have found so far is based on this article. The idea is to connect to the ssh server that is easily installable with Powershell into W10, and then to set WSL2 bash as your default shell.
As some quick background, if you run Powershell and then simply run bash, it will execute .\Windows\System32\bash.exe, since .\Windows\System32\bash.exe is in path (cf. cmd /c path), which has the effect of turning the W10 Powershell into the WSL2 Ubuntu bash shell. Similarly, when in a bash shell, you can run powershell.exe to convert the shell back into a Powershell (since /mnt/c/Windows/System32/WindowsPowerShell/v1.0 is in the path).
So the approach we are taking is to basically ssh into Powershell and then run ‘bash’ (or a process under the hood that is similar to this).
First, check if you have ssh installed by runing the following from an Administrator’s Powershell:
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Name : OpenSSH.Client~~~~0.0.1.0
State : Installed
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
To install an ssh server, run:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Now start the service and get it to start automatically:
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Now we can set the default shell to bash with the following:
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\WINDOWS\System32\bash.exe" -PropertyType String -Force
Of course, you can skip this step if you want to ssh into W10 with Powershell and then jump into bash as needed. Equally, with this setting, you ssh into bash and then can switch to Powershell with powershell.exe as described above.
Now you need to go to Windows Defender Firewall > Advanced Settings > Inbound Rules and begin the “New Rule…” wizard. Select “Port” and click Next, then select TCP and enter “22” into the field labelled “Specific local ports” and click next. Then select “Allow the connection” and clikc Next. Then uncheck all but the “Private” option and click Next. The give this inbound rule a name like “SSH-Inbound-I” and click Finish. Do the same for an outbound rule, and now you can accept ssh connections from within your private network.
That’s it — now you can ssh into your W10M with your windows (not Ubuntu!) username/password combination, and get passed straight through to a WSL2 bash prompt.
I would most definitely not recommend exposing your W10M to anything outside your private network!
WSL2 Misc Notes
What about graphical applications? The short story is that one can set up their W10M to display Linux GUI applications, but it involves a lot of set up. This article claims that Microsoft is working to make Linux applications run somewhat seemlessly on W10, so I plan to just wait for that (since there is no Linux GUI in particular that I am keen to use on my W10M.)
How does the Ubuntu file system interact with the W10 file system? In the last few months there have been some improvements in this regard. When you start an Ubuntu shell, it lands you in your W10 home folder in what looks as though it’s a mounted volume! So you can peruse and edit the files on your NSFT file system from within your Linux shell! (About a year ago, you could do something similar, but it was not so nearly smooth and “out of the box”. I’m really pleasantly surprised by how much Microsoft seems to be investing in WSL2, and how well these things are working together.
What about networking? Again, a year ago, if you tried starting an apache server in Ubuntu, then, being within a virtual machine, it would not just “work” out of the box. But now when you do it, you can find access that network from a W10 browser just by going to localhost in the url bar. Awesome!
What about ssh-ing into your Ubuntu shell?
Intro to the new W10 Package Manager “winget”
One of the best and most innovative things about Linux is the concept of the “package manager”. If you want to add software to your Linux machine, then, typically, you do not have to hunt down something to download, and then have that installer place something somewhere on your machine that may or may not be malware and/or completely impossible to remove (due to lack of centralized convention). Instead, you use a command line tool that speaks to a centralized remote “repository” of software. This CLI is called a package manager; it makes it incredibly easy to install/update/remove software and, since it’s organized by the same people in charge of your Linux distribution,† you can have confidence that it won’t have any malware in it, and that it will be placed on your file system according to smart conventions so that it will not clash with other installed software, will have all the correct dependencies, etc., and thus will be easy to upgrade or remove in the future.
As a rule of thumb, whenever you can install a progam via a package manager, install it via a package manager. Conversely, if the only option to install software is via a third party download, then first consider whether you really need it or if there is an alternative provided by a package manager. There is a lot to be said in keeping your machine lean and well organized, and key to this is to avoid third-party download installations or to keep them to an absolute minimum. (I very rarely install programs other than through a package manager these days.)
(Further aside: one of my dreaded memories of owning a Windows PC back in the 90s was the inexorable feeling that the machine would inevitably become bloated over the course of time as you download/install more and more software that — depending on the 3rd parties competence and/or moral compass — will cripple eventually bring your machine to a horrible grinding halt.)
Thankfully, Microsoft have come round (after realizing the popularity of centralized repositories like the Apple App store, Google Play, Homebrew, and all the various Linux package managers). First, they implemented the Microsoft Store, which allows you to get plenty of games and GUI apps, and now they have the “winget” CLI. In fact, it is the offering of WSL2 and winget that made me decide to give W10 another chance after decades of lofty disdain.
At some point winget will be built into W10. In the meantime, if you are not on the W10 insiders program, then you can install it by visiting the github release page for winget-cli, downloading the “*.appxbundle” file, and running it.

Once installed, you can run winget from a W10 Command Pompt or Powershell by running e.g. winget install vim.
Exploring winget
Our system thus far has three command line options:
- The classic Windows “Command Prompt”
- The Windows Powershell
- Ubuntu WSL2
Each of these can be launched through the Terminal app that we downloaded via the Microsoft Store. winget can be run from either of the Windows shells. To be clear, it is simply a safer and cleaner way to install programs on your W10M than by visiting myriad separate sites and downloading a graphical installer.
Here are some programs that I recommend you install right off the bat with winget:
winget install vimwinget install vscode-system-x86winget install 'Google Chrome'winget install Bravewinget install firefoxwinget install blender
vim of course is meant to be run direct from the command line but, unfortunately, winget does not configure the W10 path environment variable to make vim launchable straight after installation. To achieve this, search for “Advanced System Settings” in the W10 search field (bottom left of screen), and select the option associated with the Control Panel.

Then click on “Environment Variables” and within the area labelled “System Variables” select path and click on edit:

Then click on “New” and then type or “Browse” to the location "C:\Program Files\Vim\vim82". Click OK, etc. to apply these settings, then open a fresh Powershell or Command Prompt. There you can type and run the command path to check the new content of the Path environment variable and verify that the path we just added is recognized within the shell.
As an alternative way to check if vim is findable from within a Command Prompt shell, you can run where vim, and from a Powershell, run cmd /c where vim.‡ Now we can run vim from the Windows shells to edit files directly.
Likewise, GUI apps like can be found in the main applications menu as per apps downloaded by the Microsoft Store. In some cases you can download a GUI app through either the store or winget, such as blender.
One shortcoming, IMO, of winget is the fact that you cannot perform upgrades or uninstalls right out of the box. These are considered “experimental features”. To enable these features, you need to run winget settings, which opens a file in notepad, top which you then add the following block:
{
...
// DWD ADDED:
"experimentalFeatures": {
"uninstall": true,
"upgrade": true
}
}
Now you can run e.g. winget upgrade 'Google Chrome', etc. (IMO, this sort of functionality is supposed to be central to what a package manager is all about, and does NOT lend confidence.)
Backing Up a W10 Machine
… to be continued …
- *I am not claiming these are the only or even best way to accomplish things, they are just part of my regular workflow, and so I want to be able to map these concepts from Mac to W10
- †This is not always the case; sometimes you need to add access to additional remote repositories; when you do this, of course you have to make a judgement as to the reputability of the source.
- ‡cmd /c CMD just means to use the Command Prompt command to run CMD