batcat: Syntax Highlighting Replacement for cat and more Commands

My time writing for another blog about rust led me to the batcat command, which provides a code syntax-highlighting replacement for the Unix cat and more commands, written in rust. bat — command-line utility in Rust // Lib.rs sudo apt install bat batcat lib.rs batcat wince It is not helpful in this example, but thereContinue reading “batcat: Syntax Highlighting Replacement for cat and more Commands”

Linux Shell Commands to Update Windows Subsystem for Linux

This blog post provides information about Linux shell commands that we can use to update Windows Subsystem for Linux and Linux itself. We can use the wsl.exe command with the –update argument to update WSL, but we need to use an elevated command shell. For this we can use the runas.exe command, but we haveContinue reading “Linux Shell Commands to Update Windows Subsystem for Linux”

Access Windows “God” Mode from Windows Subsystem for Linux

You can use the technique in the following script to access Windows “God” mode from a bash shell script running under Windows Subsystem for Linux (WSL). There may be a better way, preferably a command line argument to explorer.exe that does not depend on the existence of a file system directory for this purpose. Update:Continue reading “Access Windows “God” Mode from Windows Subsystem for Linux”

Open Remote (Github) Code Repositories in Visual Studio Code without Cloning

Microsoft’s github provides the Remote Repositories extension for the Microsoft Visual Code editor to open remote code repositories such as from Github without cloning those projects to your local system. First, I highly recommend that you use Windows Subsystem for Linux (WSL), with or without Visual Studio Code, but especially if you code in VisualContinue reading “Open Remote (Github) Code Repositories in Visual Studio Code without Cloning”

Access WSL File Systems Read-Only from a Browser

In Windows, I opened an .html file in the Windows Subsystem for Linux (WSL) /tmp directory (corresponding to \\wsl.localhost\Ubuntu-20.04\tmp on Windows) and found something unexpected in the address bar: file://wsl.localhost/Ubuntu-20.04/ followed by the Unix file system path to the file. Apparently, wsl.localhost works like a webserver with directory browsing enabled, from which you can accessContinue reading “Access WSL File Systems Read-Only from a Browser”

One Way to Run New Windows Applications from the Command Line

One of the annoying things about many modern Windows applications is that it is not easy to locate and invoke their executables. For example, how do you launch Windows Sound/Voice Recorder from the command line in Windows 10? Here is one way to find out how. You can run explorer.exe shell:AppsFolder to open the ApplicationsContinue reading “One Way to Run New Windows Applications from the Command Line”

Investigate Commands in WSL Bash Shells

This blog post contains guidance for gathering information about commands available in bash shells, specifically under Windows Subsystem for Linux (WSL). TLDR: Use type, which, and file to determine whether a command is an alias or a function or where it is and its type. To my knowledge, you can invoke four types of commandsContinue reading “Investigate Commands in WSL Bash Shells”

Build and Run Windows and Linux Binaries of Rust Programs from Bash with WSL

This blog post explains one way to build and run both Windows and Linux binaries of a rust program from a single process running under Windows Subsystem for Linux (WSL). Update 21.June.2021: Current code at wink/wince at main · deliverystack/wink (github.com) From a bash process under WSL, you can use a shell script to buildContinue reading “Build and Run Windows and Linux Binaries of Rust Programs from Bash with WSL”

Windows 21390.1 First Impressions

This short blog post describes my first impressions of Windows 21390.1 available to Windows Insiders as of June 2021. The upgrade took an hour or more, possibly because I walked away and did not respond immediately when it powered down while rebooting or when it needed a password. I notice that Windows has again resetContinue reading “Windows 21390.1 First Impressions”