Skip to content

Instantly share code, notes, and snippets.

@nverba
Last active January 8, 2018 10:22
Show Gist options
  • Save nverba/017f50a655586f10b875 to your computer and use it in GitHub Desktop.
Save nverba/017f50a655586f10b875 to your computer and use it in GitHub Desktop.
No sudo install of n & iojs with NPM
#!/bin/bash
# prerequisites, the terminal should be able to "Run command as login shell", see profile/title & commands
# Create .local/bin
mkdir -p ~/.local/bin
# Add local/bin to path & add environment variable N_PREFIX
printf '\nexport PATH=$PATH:$HOME/.local/bin' >> $HOME/.bash_profile
printf '\nexport N_PREFIX=$HOME/.local' >> $HOME/.bash_profile
# Download n
git clone https://github.com/visionmedia/n
# Install n to ~/.local
PREFIX=$HOME/.local make install -C n
# Reload .bash_profile
source ~/.bash_profile
# Delete n download
rm -rf n
# You should now be ready to install node stable after realoading all terminals.
# $ n stable or "$ n io stable", for io flavoured node
@kumarvarun007
Copy link

how we get sudoo and node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment