Skip to content

Instantly share code, notes, and snippets.

@krowe
krowe / GNU_Win32.md
Last active December 14, 2021 16:15
This guide shows you how to make a more GNU friendly Windows environment

Guide to a more GNU-like Windows CLI

Note: Most of this is now outdated information. Now that WSL exists it is the prefered way to use Linux on a Windows machine. The Windows 11 command line also does a lot of the things I used ConEmu for by default. It's still better but not as much so. The Windows app store now remembers your software so that you can easily redownload it so my personal need for Chocolately is all but gone as well.

This is a guide to setting up a Windows command line environment which supports many of the commonly used features available in a GNU\Linux environment. It is most useful to people whom work in mixed environments and would like a more seamless experience when switching back and forth but is also useful to those who've never used the GNU tools before.

Apache Host Sync

This script is useful for web developers and administrators whom use Apache name based virtual hosts to host multiple websites on the same server and would like to have the Listen and NameVirtualHost directives automatically updated when they add or remove virtual hosts.

Even though these are usually easy to configure it can be tedious to keep these values updated on some setups where hosts are being added and removed frequently. In these setups you could just add these directives to your vhost configuration but, in the case of the Listen directive, you'll need to ensure that they do not conflict so it is more handy to have them all listed in the same place. This is why the default Apache setup breaks these out into a separate file called ports.conf on most setups. Using this script you'll have the best of both worlds by being able to configure only the vhost definition while still having a central definition to avoid conflicts.

It works by scanning a list of configuration files