• Skip to primary navigation
  • Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

path

GitBash Path

by Ulysses · Apr 4, 2021

Open Git Bash. Change to the root directory of Git Bash.

cd ~
echo $PATH
/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin

cd ~ echo $PATH /bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin

Edit .bash_profile or .bashrc. It was .bash_profile in my case. Showing a truncated path.

Add your custom path to the PATH variable. Save file. Exit Git Bash.

PATH="/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/custom/path"

PATH="/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/custom/path"

Open Git Bash again and check your updated Path.

echo $PATH

echo $PATH

Result.

/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/custom/path

/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/custom/path

Filed Under: Windows Tagged With: edit, git bash, path

Git Bash Path

by Ulysses · Aug 19, 2020

Here’s how to add or edit the PATH in Git Bash. Edit your bash_profile.

vi ~/.bash_profile

vi ~/.bash_profile

Set your path by adding the new path at the end.

PATH="/c/WINDOWS/system32:/c/Users/firstname.lastname/google-cloud-sdk/bin"

PATH="/c/WINDOWS/system32:/c/Users/firstname.lastname/google-cloud-sdk/bin"

The example path listed above is truncated for brevity.

Filed Under: Cloud, Linux Tagged With: add, bash_profile, gcloud, git bash, path

Copyright © 2012–2021