差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
linux:nvm [2020/06/15 04:06] – 作成 ともやん | linux:nvm [2020/09/11 17:03] (現在) – ともやん | ||
---|---|---|---|
行 30: | 行 30: | ||
[ -s " | [ -s " | ||
[ -s " | [ -s " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 実行後は **~/ | ||
+ | <WRAP prewrap 100%> | ||
+ | <code bash> | ||
+ | $ cat ~/.bashrc | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% #result> | ||
+ | <code bash> | ||
+ | # .bashrc | ||
+ | |||
+ | # Source global definitions | ||
+ | if [ -f /etc/bashrc ]; then | ||
+ | . /etc/bashrc | ||
+ | fi | ||
+ | |||
+ | # User specific environment | ||
+ | PATH=" | ||
+ | export PATH | ||
+ | |||
+ | # Uncomment the following line if you don't like systemctl' | ||
+ | # export SYSTEMD_PAGER= | ||
+ | |||
+ | # User specific aliases and functions | ||
+ | |||
+ | export NVM_DIR=" | ||
+ | [ -s " | ||
+ | [ -s " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | **~/ | ||
+ | <WRAP prewrap 100%> | ||
+ | <code bash> | ||
+ | $ . ~/.bashrc | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | **nvm** の動作確認。\\ | ||
+ | <WRAP prewrap 100%> | ||
+ | <code bash> | ||
+ | $ nvm --version | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100%> | ||
+ | <code bash> | ||
+ | 0.35.3 | ||
+ | </ | ||
+ | </ | ||
+ | ※Linux の **nvm** では、バージョン確認は **--version** オプションである。\\ | ||
+ | <WRAP prewrap 100%> | ||
+ | <code bash> | ||
+ | $ nvm --help | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code bash> | ||
+ | Node Version Manager (v0.35.3) | ||
+ | |||
+ | Note: < | ||
+ | - full or partial version numbers, starting with an optional " | ||
+ | - default (built-in) aliases: node, stable, unstable, iojs, system | ||
+ | - custom aliases you define with `nvm alias foo` | ||
+ | |||
+ | Any options that produce colorized output should respect the `--no-colors` option. | ||
+ | |||
+ | Usage: | ||
+ | nvm --help | ||
+ | nvm --version | ||
+ | nvm install [-s] < | ||
+ | --reinstall-packages-from=< | ||
+ | --lts When installing, only select from LTS (long-term support) versions | ||
+ | --lts=< | ||
+ | --skip-default-packages | ||
+ | --latest-npm | ||
+ | --no-progress | ||
+ | nvm uninstall < | ||
+ | nvm uninstall --lts | ||
+ | nvm uninstall --lts=< | ||
+ | nvm use [--silent] < | ||
+ | --lts Uses automatic LTS (long-term support) alias `lts/*`, if available. | ||
+ | --lts=< | ||
+ | nvm exec [--silent] < | ||
+ | --lts Uses automatic LTS (long-term support) alias `lts/*`, if available. | ||
+ | --lts=< | ||
+ | nvm run [--silent] < | ||
+ | --lts Uses automatic LTS (long-term support) alias `lts/*`, if available. | ||
+ | --lts=< | ||
+ | nvm current | ||
+ | nvm ls [< | ||
+ | --no-colors | ||
+ | --no-alias | ||
+ | nvm ls-remote [< | ||
+ | --lts When listing, only show LTS (long-term support) versions | ||
+ | --lts=< | ||
+ | --no-colors | ||
+ | nvm version < | ||
+ | nvm version-remote < | ||
+ | --lts When listing, only select from LTS (long-term support) versions | ||
+ | --lts=< | ||
+ | nvm deactivate | ||
+ | nvm alias [< | ||
+ | --no-colors | ||
+ | nvm alias < | ||
+ | nvm unalias < | ||
+ | nvm install-latest-npm | ||
+ | nvm reinstall-packages < | ||
+ | nvm unload | ||
+ | nvm which [current | < | ||
+ | nvm cache dir | ||
+ | nvm cache clear Empty cache directory for nvm | ||
+ | |||
+ | Example: | ||
+ | nvm install 8.0.0 | ||
+ | nvm use 8.0 Use the latest available 8.0.x release | ||
+ | nvm run 6.10.3 app.js | ||
+ | nvm exec 4.8.3 node app.js | ||
+ | nvm alias default 8.1.0 Set default node version on a shell | ||
+ | nvm alias default node Always default to the latest available node version on a shell | ||
+ | |||
+ | Note: | ||
+ | to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`) | ||
</ | </ | ||
</ | </ |