WSL 2 or How I Brought my Linux and Windows Installs Together

A while back I bought a mini PC to replace my old, tired and non-functional Linux box. 16G RAM, 512GB SSD, 11th Gen Intel Celeron and it included a license for Windows 11 Pro. Now I haven’t been happy with Windows since Windows 10 would drain my laptop’s battery by deciding it needed to install updates in the middle of the night. I’d pick up my laptop after a few days and the battery would be exhausted! So, I swore off Windows, opting instead for Linux (usually Ubuntu) and Chromebooks. But I got a Windows 11 Pro sitting in front of me on my new PC. Being the packrat that I am, I didn’t wipe the Windows partition but split the SSD into another partition and installed Ubuntu (which happily recognized the bootable Windows partition and set things up so I could boot to either Windows or Linux.

Curiosity eventually got the better of me and I started fooling around with Windows. I recalled messing with Window Subsystem for Linux (WSL) on my Windows 10 machines so I did some searches and found that Microsoft had come up with WSL 2. Futher, there were many distros available from the Windows Store. So I fired up WSL2 and loaded Ubuntu 22.04. Yup, looks pretty nice! Hmmm…I’ve got this external drive that’s formatted at ext4 and holds a bunch of the stuff I was using on my Linux box (media library, precious files and photos, backups, etc). Can I use that on Windows? Well, not without adding some “stuff” to Windows but I CAN attach the drive to my running WSL2 Ubuntu! So I did.

Now I can run some Windows-only services that I’ve been wanting to try out (Channels DVR server, for one) alongside my Linux services (JR Media Center for one, not to mention the Samba server which makes my backups, files and pictures available to my other machines.

The only thing that’s missing is an automated way of attaching that disk to my Linux WSL2 instance and redirecting the appropriate ports to the Linux instance. I managed to get that done with a PowerShell script that I had ChatGPT write for me. That’s right, ChatGPT wrote a PowerShell script for me! For a couple of weeks I had been trying to figure out what I could use ChatGPT for when it occurred to me to give it this task. I don’t know PowerShell. Sure I’m familiar with the basic concepts but the object model and the commands themselves are largely unknown to me. ChatGPT spit out the script in about 10 seconds and, while it wasn’t 100% right, it only took a hour or so of fiddling to get it to work just perfectly! ChatGPT to the rescue! But its not a panacea – I’ll do another blog post about that later.

WSL 2 or How I Brought my Linux and Windows Installs Together Read More »

Buh-bye Google Keep, OneNote, Evernote!

Open source Notesnook ( aims to be THE replacement for all your note taking needs. Fully encrypted on your device before storing on their cloud service (self-hosted option coming), it’s a zero knowledge service meaning they can’t decrypt your notes. With a web app ( and apps for iOS, Android, MacOS, Windows, and Linux you’re pretty much guaranteed to be able to use it wherever you need or want with full synchronization across all platforms. It’s still in its relative infancy and updates generally make it to the web app before other platforms. Roadmap at

Buh-bye Google Keep, OneNote, Evernote! Read More »

An SSH tunnel as a system service?

I came across this today and it’s an interesting idea! While I’m not sure I endorse creating and maintaining a tunnel, especially as root, I’m sure there are use cases where it makes sense. If nothing else, defining the config files and their contents to create a service is worth seeing. All the details, including how to make it run after reboot are at

An SSH tunnel as a system service? Read More »

More SSH? Yes, please!

My local server died a little over a week ago (more about that in a future post) so I bought a new mini PC (love those little things – got one with an 11th gen Intel Celeron, 16GB RAM and 512GB SSD for $280). In setting it up I opted to keep my VNC sessions local to the new machine accessing them via SSH tunnels. In researching various ways to establish and maintain the tunnel I came across and (re)learned quite a few things but the really interesting bits are in the comments! From the use of -M to establish a “master” mode for connection sharing and how to use it, to some basic scripts to make it easier to use, to autossh (, to a nice little script called (in the comments) I’ve adapted and adopted several for my own use and I recommend the article!

More SSH? Yes, please! Read More »

Tailscale for your Docker containers!

At DockerCon, Tailscale announced and launched their Docker extension. What does this mean? You can put your containers on your Tailscale VPN! Yeah, that’s a BIG deal! The announcement is at and the instructions to install and use it are at While the documentation only addresses Docker Desktop, gives instructions for installing extensions through the CLI, and downloads are at, which is currently in beta.

Tailscale for your Docker containers! Read More »

Those Linux apps on your Chromebook …

I mean the ones that appear in the launcher. There are files in your Linux container that specify the icon, the program to launch and a number of other things. Where are they located? Launch your terminal (or your favorite Linux file browser) and navigate to ~/.local/share/applications/ and/or /usr/share/applications/ and there you should find a number of files ending in .desktop. These are text files that contain the specifications for the applications that will be shown in the launcher (it is, in fact, a standard across Linux that is defined in You can modify them, add, or delete them but I find it useful just to look through the files to see what’s executed and the other various parameters associated with launching an program by way of its icon.

Those Linux apps on your Chromebook … Read More »

Finally, a point-to-point VPN!

I’ve set up a VPN at home and, honestly, in my config, it’s a PAIN! I have 3 routers that need to have ports opened and then I need to make sure that certificates and passwords are all secure.

Then I found! What a breath of fresh air. Why didn’t anyone think of this before? Create an account on then install the tailscale service on the machine you want to be a part of the VPN and run it. The service connects to the tailscale server and it becomes an immediately available VPN target, complete with its own hostname (which you can change) and its VPN IP address. If you enable their “MagicDNS” in your settings then the hostnames all resolve to their VPN IP addresses (i.e. the hostname is first checked against the hostnames on the VPN before being checked against other DNS resolvers). Voila! No config, no ports to open, no firewall rules to manage! Now, when you’re away from home, you can get to your home server with confidence.

It’s free for a single hobby/personal user. There are a few restrictions as to how many subnets you have available but, honestly, if you’re a home user, the restrictions probably won’t bother you. It’s multi-platform with binaries for Android, MacOS, iOS, Windows, and Linux so you can connect just about anything you want. They’re on github at and a place to discuss it at And, yes, you can use tailscale to act as a subnet router – – to get to those devices (e.g. printers) on which you can’t install tailscale.

Apologies for the delay between postings but I prefer to try the things before I post about them and tailscale took a while.

Finally, a point-to-point VPN! Read More »

Getting set up with Chrome OS

I’ve had chromebooks for quite a while but it’s only within the last year or so that I’ve thought it was ready to be my primary tool. My Acer Spin 713 has an 11th gen Intel i5 with 8GB RAM and 256GB disk and it’s quite fast and capable! I run a Debian Linux and have a number of Android apps installed. It’s my “daily driver” as some call it – the machine I reach for and use far more than any other. And I got it on sale for less than $500.

It can be a chore getting set up for the first time but I came across which has some good information to get set up. And if you’re interested in doing more than just getting set up, it has some useful info on expanding your Linux environment and preparing to develop. I recommend it.

Getting set up with Chrome OS Read More »

3 new (to me) linux (mac, android,windows) tools

I’ll cut right to the chase, Copyq, syncthing, and tldr.

Copyq, at, is a clipboard manager for Linux, Windows, MacOS, AND ChromeOS in the Linux environment! It has a GUI as well as a command-line interface and in the ChromeOS environment, captures clips from BOTH Linux and ChomeOS! CHeck out the docs.

Tldr, at, provides a cheat-sheet-like summary of command options. It’s not as full function as a man page but can often provide just that one bit of info you need. It provides info on Android, Linux, MacOS, Windows, Sun OS(!), and a set of common commands like 2to3 (convert python 2 code to python 3), adb (Android Debug Bridge which can be installed on many different platforms), and atom (a cross-platform editor).

Syncthing, at, is an open source, multi-platform, authenticated, continuous file synchronization program with communications secured by TLS. It works on MacOS, Windows, Linux, Android among many others.

3 new (to me) linux (mac, android,windows) tools Read More »

Making my bash history more informative

I’m a long time bash user and have found that I really want more information in my bash history file … more than just the typical command number and command line. So, to my .bashrc I’ve added a time stamp, process id, and tty to the history output by setting HISTTIMEFORMAT like so

export HISTTIMEFORMAT="%F %T %Z %z $$ $TTY "

which produces something like

957 2022-03-02 10:37:05 PST -0800 684 /dev/pts/0 history | tail

As you can see, this adds, after the command number, the date as YYYY-MM-DD, the time with timezone and GMT offset, the process id and the tty on which it was entered. I also like to keep track of the commands that are entered when I’m in a certain directory (useful for git and, well, all sorts of things) so I add

$PWD "$(history 1)" >> ~/.history/$(basename $PWD)'

This appends a history line to a directory in ~/.history which corresponds to the last component of the directory in which the command was entered. So, if my current working directory is ~/dev/git, commands are also appended to ~/.history/git along with the tty on which they were entered, the current process id, the current user and the full working directory which gives me something like

/dev/pts/1 1806 user /home/user/git 951 2022-03-02 10:47:00 PST -0800 1806 /dev/pts/1 ls -l ~/.history

Note, I don’t change HISTFILE so everything is still in one history file. And I use an alias to show history for the current directory

alias cathist='cat ~/.history/$(basename $PWD)'

And, while I’m at it, I enable host name completion with shopt -s hostcomplete and also ask bash to try to save a multiline command in one history entry with shopt -s cmdhist. And if I have lots of space, I allow my history file to grow as large as needed by setting (or unsetting) HISTFILESIZE and HISTSIZE. So I end up with the following lines added to my .bashrc

export HISTSIZE=
shopt -s histappend
shopt -s cmdhist
shopt -s hostcomplete

export HISTTIMEFORMAT="%F %T %Z %z $$ $TTY "

$PWD "$(history 1)" >> ~/.history/$(basename $PWD)'

alias cathist='cat ~/.history/$(basename $PWD)

I picked this up from various sources and modified it to fit my needs. Feel free to use or hack as you see fit.

Making my bash history more informative Read More »