Skip to content

Instantly share code, notes, and snippets.

@johncokos
Last active September 15, 2019 00:32
Show Gist options
  • Save johncokos/66fad129ce3493d079755f83c4360e9f to your computer and use it in GitHub Desktop.
Save johncokos/66fad129ce3493d079755f83c4360e9f to your computer and use it in GitHub Desktop.
# Nothing below here will change how your terminal looks, rather, it will change some things about how it works.
# This allows you to open html files in Chrome more easily by typing "chrome filename".
alias chrome="/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe"
# set -o vi
# This allows you to switch between the Ubuntu root and your Windows Root.
WINDOWS_USER=$(/mnt/c/Windows/System32/cmd.exe /c 'echo %USERNAME%' | sed -e 's/\r//g')
# wr evaluates to the absolute path to your Windows user's root.
export wr=~/../../mnt/c/Users/$WINDOWS_USER/
# This gives us a quick way of moving directly to the Windows root
alias cdwr='cd "$wr"'
# This brings you to your Windows Working directory immediatly when you open a new terminal.
cdwr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment