Portable Bash CLI For Windows

Justin
Fierce Punch Studios
3 min readSep 27, 2017

Inspired by the recent release of Google Backup and Sync, I sprang for extra Google Drive space to migrate my utility applications to the Google platform. I use Windows for gaming, so that included a command line toolkit to work in the Linux and Unix-focused world of web development. Today, I’ll show you how I set up Bash, got a decent console emulator, sync settings between devices, and do it all on Windows!

First, download the following applications:

Second, install Google Backup And Sync, and make sure to follow the instructions to set up a Google Drive folder.

Third, set up a folder structure on Google Drive to hold your portable applications. I like the structure <User>/Google Drive/Apps. You’ll need a folder for Git and a folder for ConEmu.

Portable Git for Windows installer

Fourth, execute the Portable Git for Windows archive you downloaded. Install it in a new folder named PortableGit in the Apps folder from our Third step.

Fifth, extract the ConEmu Portable archive to its folder in Google Drive/Apps.

Sixth, configure ConEmu to use Git Bash on startup. ConEmu launches shells using Tasks — which can be complicated — so this will be a multi-step step.

6.a) Open the Settings menu and click on the Startup -> Tasks page.

6.b) Click on the + button to create a new Task. Give it the name Bash::PortableGit. The colons are important, because ConEmu uses them to create sub-menus.

6.c) Put the command to launch Bash in the text field on the lower right. This will be harder than just using the File path… button, because we want to use relative paths so that it will work on any system regardless of where Google Drive is installed. Use the following launch command:

“%ConEmuBaseDir%\..\..\PortableGit\bin\bash.exe” -new_console:d:”%UserProfile%”

ConEmu Task with relative paths

Seventh, click on the Startup tab, click Specified named task, and then select {Bash::PortableGit} from the drop-down menu.

ConEmu Startup Task

Finally, click Save settings and relaunch ConEmu. It should launch with a Bash CLI.

Now, any Windows system that runs Google Drive can sync with your account to use a working Bash environment. Happy developing!

--

--