Fill these in once
- Add it to your shell settings and load them
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
Check it worked
- Check it's there
echo $PATH | tr ':' '\n'
Undo it
- Open the settings file and delete that line
open -e ~/.zshrc
- Add it to your shell settings and load them
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
Check it worked
- Check it's there
echo $PATH | tr ':' '\n'
Undo it
- Open the settings file and delete that line
nano ~/.bashrc
- Add it to your user PATH
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";C:\tools", "User")Close and reopen PowerShell afterwards.
Check it worked
- Check it's there
$env:Path -split ';'
Undo it
- Remove it again
[Environment]::SetEnvironmentVariable("Path", (([Environment]::GetEnvironmentVariable("Path", "User") -split ";") | Where-Object { $_ -ne "C:\tools" }) -join ";", "User")