“Homey don’t play dat” (Terminator X)

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”

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”

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”

My Initial Impressions of the Rust Programming Language

This blog post presents my initial reactions after a few days working with the Rust programming language. Of course, anyone using a programming language should read the book (https://doc.rust-lang.org/stable/book/). Some people in the rust community may push on this pretty hard. I like to read books, but I do not like to read online, andContinue reading “My Initial Impressions of the Rust Programming Language”

Rust: cannot be used to concatenate two `&str` strings/error[E0369]: cannot add `String` to `&str`

I have to be honest that I cannot easily understand or explain something as simple as string processing in rust, but I have figured out how to work around some of the errors I get from the compiler. I think that Rust: error[E0369]: cannot add `String` to `&str` is likely one of the first thatContinue reading “Rust: cannot be used to concatenate two `&str` strings/error[E0369]: cannot add `String` to `&str`”

Rust: Beware Parentheses on If Conditionals

Assuming that the three conditions represent Booleans, I noticed that code based on this rust would compile, where this would be a syntax error in C#. In rust, the if statement does not require grouping conditions within parentheses. Without noting parentheses placement carefully, I believe that, at least for developers familiar with languages where ifContinue reading “Rust: Beware Parentheses on If Conditionals”

Rust Command Line Tool to Access Windows Features and Commands

My first attempt at a rust program is the winc (pronounced wink) or wince (Windows Command Entry) command line tool that simplifies access to common Windows features and programs. Beware that this morning I didn’t know the first thing about programming with rust; I only knew how to install it, as I had noted inContinue reading “Rust Command Line Tool to Access Windows Features and Commands”

View Windows Process Information from Windows Subsystem for Linux

This blog post explains how a Bash shell script running under Windows Subsystem for Linux you can determine whether a process is running. The Linux ps command can only see processes invoked by WSL. The Windows tasklist.exe command lists all Windows processes. In WSL Bash shells running under Windows Terminal, I use the following functionContinue reading “View Windows Process Information from Windows Subsystem for Linux”

Windows Terminal Bash Shell: Open New Tab in Same Directory

When you are using a Windows Subsystem for Linux Bash shell in Windows Terminal, you can use the techniques described in this blog post to open a new tab to the current directory. In Windows Terminal, you can use keyboard shortcuts such as Ctrl+Shift+1 to open new tabs using the various installed and configured shells.Continue reading “Windows Terminal Bash Shell: Open New Tab in Same Directory”

Windows Subsystem for Linux: Use Functions to Operate Outlook

You can invoke Microsoft Outlook with command line switches to perform specific operations such as to compose an email and attach a file. In Windows Subsystem for Linux, you can define a variable to store the location of the outlook executable and aliases or functions to call it. Functions seem to make it easier forContinue reading “Windows Subsystem for Linux: Use Functions to Operate Outlook”

WSL: Run SysInternals Utilities without Installing Them

This short blog post explains how you can use SysInternals Live to run its utilities from Windows and Windows Subsystem for Linux shells without explicitly downloading or installing them. In a Windows shell , you can invoke SysInternals Live utilities such as: \\live.sysinternals.com\tools\handle You can use cmd.exe /c to invoke SysInternals Live utilities from aContinue reading “WSL: Run SysInternals Utilities without Installing Them”

Windows 10 Virtual Desktop Keyboard Shortcuts

This blog post explains some of the virtual desktop features that Windows 10 includes. Virtual desktops function like multiple desktops. You might have one virtual development that you for browsers windows and applications that you use for communications, one Windows Subsystem for Linux shell in full screen mode, one for a fullscreen remote desktop sessionContinue reading “Windows 10 Virtual Desktop Keyboard Shortcuts”

Windows Subsystem for Linux Cheat Sheet of Cheet Sheets

This blog post intends to list and provide cheat sheets for common information needs while working with Windows and especially Windows Subsystem for Linux (WSL). Optimally, this information could eventually appear in a cheat sheet could work as a Windows or Windows Terminal desktop background. If you know of additional resources to include, please commentContinue reading “Windows Subsystem for Linux Cheat Sheet of Cheet Sheets”

WSL: Pipe Output to the Windows Clipboard

This blog post explains how you can pipe output to the Windows clipboard under Windows Subsystem for Linux (WSL). This is a repost of https://www.linkedin.com/pulse/wsl-write-shell-stream-windows-clipboard-john-west/. You can use the clip.exe command to stream text from a shell command to the Windows clipboard. I use this technique in Windows Terminal with Windows Subsystem for Linux (WSL).Continue reading “WSL: Pipe Output to the Windows Clipboard”

Windows Subsystem for Linux (WSL) and Windows File Systems

This blog post explains how you can access different types of file systems from Windows Subsystem for Linux (WSL). This is a repost of https://www.linkedin.com/pulse/wsl-windows-file-systems-john-west/ In Windows Subsystem for Linux shells, you can access the Windows C:\ drive as /mnt/c, and you can use the wslpath command to convert between Windows and Linux path formats.Continue reading “Windows Subsystem for Linux (WSL) and Windows File Systems”

Windows Subsystem for Linux (WSL) Daemons Including Cron

This blog post contains information about using Linux daemons (background processes) under Windows Subsystem for Linux (WSL). This is a repost of https://www.linkedin.com/pulse/wsl-linux-daemons-including-cron-john-west/. An example of using daemons involves cron and crontab, which let users configure the system to run programs on a schedule. The cron command is a daemon that starts on system initializationContinue reading “Windows Subsystem for Linux (WSL) Daemons Including Cron”

Use OneDrive to Share WSL Commands Between Accounts and Machines

This blog post explains how to make commands available easily to multiple Windows accounts and Windows Subsystem for Linux (WSL) accounts on multiple machines that share access to a common OneDrive. If you use commands that are not availble to WSL, such as if you download command line tools for Windows or write your ownContinue reading “Use OneDrive to Share WSL Commands Between Accounts and Machines”

Microsoft Edge Browser Configuration and Use

This blog post contains suggestions for configuring and using the Microsoft Edge web browser on Windows systems, including keyboard shortcuts. Edge is arguably the most secure browser available for Windows, though likely not supporting privacy as well as others. I have heard that Edge automatically includes AdBlock. I have written notes about Edge in variousContinue reading “Microsoft Edge Browser Configuration and Use”

Introducing the wslguy.net Blog

This blog intends to help readers have safer, faster, more productive, and more enjoyable experiences using Microsoft Windows 10 with Windows Subsystem for Linux (WSL), the Microsoft Edge browser, Microsoft Office, and Microsoft Visual Studio. This blog may assist Windows users in learning and eventually migrating to Linux. Whenever possible, this blog will explain howContinue reading “Introducing the wslguy.net Blog”