Skip to content

Latest commit

 

History

History
115 lines (86 loc) · 3.63 KB

File metadata and controls

115 lines (86 loc) · 3.63 KB

Windows Powershell install Chocolatey

Following these Instructions results:

  • Installing
    • Chocolatey; software installation manager
    • fnm; Node version manager built in Rust
    • Git; Version Control System
    • Git BASH; bash emulation for *NIX-like usage
    • Node.js; LTS version of JavaScript Runtime environment
    • VSCode; neat web development code editor
  • adding files to HOME Directory:
    • ~/.bashrc

Download Chocolatey to simplify installing software.

To Install Chocolatey, you must...

Open Windows Powershell as Administrator

  1. Turn on computer.
  2. Click Windows Button
  3. Type powershell
  4. Click ctrl + shift + enter
  5. Choose Yes

At this point, you should be in a window that says Administrator: Windows Powershell

  1. Type cd $HOME or cd ~ and then click enter to change to your user directory
  2. OPTIONAL: you can disable the Prompt in User Account Control Settings according to this article

Install Chocolatey

  1. You must open Windows Powershell as Administrator to do the following steps.
  2. Copy & Paste the following:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

more info at https://chocolatey.org/install#individual

  1. Click enter
  2. Wait until complete
  3. After waiting, type choco --help and then click enter -- this should output the information on chocolatey commands

choco install all the software

  1. Open Windows Powershell as Administrator and have Chocolatey installed to easily install multiple software programs
  2. Copy & Paste the following:
choco install git fnm vscode -y
  1. Click enter
  2. Wait until complete... may need to hit enter a bunch of times...
  3. After it is complete, type exit and then click enter
  4. open powershell
  5. type git and then click enter -- it should return information about git

Install VSCode Extensions through CLI

  1. Open Windows Powershell as Administrator and have Chocolatey installed
  2. Install VSCode in following manner of choco to enable VSCode Command Line:
choco install vscode -y  
  1. After successful choco install of VSCode, code command should be available in Powershell. So... confirm code command works.
  2. Install VSCode Extensions:
code --install-extension ms-vscode.remote-explorer ms-vscode-remote.remote-wsl ms-vscode-remote.remote-ssh ms-vscode-remote.remote-ssh-edit

Use fnm to manage node versions

Setup fnm using choco

choco install fnm -y

Run this process in Git Bash as Administrator.

Setup Environment shellscript

# start at the $HOME directory
cd ~

# override variable outputs into file .bashrc
fnm env > ~/.bashrc

echo '
eval "$(fnm env --use-on-cd --shell bash)"
' >> ~/.bashrc

# Git Bash requires .bash_profile to utilize .bashrc
echo "# generated by Git for Windows" > ~/.bash_profile

echo '
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
' >> ~/.bash_profile

# install and use latest NodeJS at LTS
fnm install lts-latest
fnm use lts-latest
fnm default lts-latest

# use the settings
echo run bash_profile
. ~/.bash_profile

# node at LTS
node -v > ~/.node-version