Making the Windows Subsystem for Linux (WSL) even better with Windows Hello


    WSLSource: Windows Central

    For developers, in particular, one of the biggest advantages of the Windows Subsystem for Linux (WSL) is that it runs on Windows. Cross-platform development has never been easier than running an actual Linux machine inside Windows 10 or Windows 11 with all the tools it opens up.

    For those people, and the more casual users like myself, or perhaps those who could use something easy to understand that demonstrates the power of this relationship, we have this.

    Windows Hello integration for WSL. It’s brilliant, takes about two minutes to install and set up, and will make daily life using WSL that bit more relaxed. But it also shows off why the Windows/WSL relationship is so powerful. You’re using a Windows-native security feature to authenticate Linux. It’s crazy.

    The WSL community comes through again

    Wsl Hello Sudo demoSource: nullpo-head/GitHub

    I’m sure facial or fingerprint recognition like this is possible in Linux, so much can be done with it after all. But it’s rare at best and I’ve not come across it (mostly it seems to hinge on drivers for the hardware), and certainly not with this level of polish.

    It also feels like it’s a Microsoft-built feature, but it isn’t. A member of the WSL community has built this tool, hosted it on GitHub, and shared it with the world.

    You can check out the GitHub repo for more details, but essentially you install the tool on your WSL distro inside Linux, and it creates the necessary bridge to Windows to integrate with Windows Hello.

    Anyone who’s used Linux will know how many times you have to authenticate sudo, so to be able to do it with your face or your finger instead of a potentially complicated password will soon add some real quality of life.

    How to use Windows Hello with WSL

    Windows Hello on WSLSource: Windows Central

    The tool you need is called WSL Hello Sudo, which captures exactly what you’re going to be doing with it. It’s hosted on GitHub and installing it is a breeze. All the information you need and more is on the GitHub repo, but I’ll break down the installation process.

    First up, you’ll need to open up a terminal and be inside a WSL distro or the Linux file system. It doesn’t matter which, if you have multiple, but you will have to install it separately on each that you plan to use with Windows Hello. Fortunately, it doesn’t take long. You can download the package from the GitHub page, unpack it manually in the right file system and then install it, or you can roll with these commands in the terminal. This is definitely the quickest way.

    wget http://github.com/nullpo-head/WSL-Hello-sudo/releases/latest/download/release.tar.gz
    tar xvf release.tar.gz
    cd release
    ./install.sh
    

    To clarify each line for you:

    1. Downloading the package from GitHub with wget.
    2. Unpacking the downloaded file.
    3. Entering the release directory.
    4. Running the installation script.

    From here the tool will run through the installation process and prompt you as required to interact with it. Running with all the default options is fine, though, unless you really have a preferential directory to install the tools in. But honestly, just hit the defaults and let it do its thing.

    Does it work?

    Windows Hello on Razer Blade StealthSource: Daniel Rubino / Windows Central

    Once the installation has run, a reboot of WSL is all that’s needed to see it in action. Once you enter your first sudo command and hit Enter, instead of WSL asking you for your password, the Windows Hello dialog box will pop up to verify your identity. And so far, for me at least, it hasn’t faltered once.

    I don’t understand exactly what it’s doing to link the two together, beyond that it makes use of a Pluggable Authentication Module (PAM) and copies a Windows command line application over to launch Windows Hello. Literally something that could only be done on WSL, so it really shows off the magic of these two operating systems working in harmony.

    The automatic configuration should be good enough for most, but as with most things on Linux, you can get in the weeds and do some manual work if you want. The GitHub repo has all the pointers you’ll need. As well as the code to have a look through if, unlike me, you understand such things.

    Not only does this shine a light on how great WSL can be when both Linux and Windows are pulled together, but it’s also a genuine quality of life improvement. Security is great, but boy, typing in the same password over and over, hour after hour, day after day sure does get tiresome. It’d be swell if Microsoft reached out to the developer of this tool and worked to build it in to WSL natively.





    Source link