0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【2025年06月版】Pixel (android) で node.js と npm をインストールする方法

Posted at

はじめに

Pixel に node.js と npm を入れたい。
ここでは、Pixel9、Pixel8 で実行したが、古いPixelでも、他のAndroidでもできるはず。

image.png

手順

  • Pixel に PlayStore から UserLAnd - Linux on Android をインストールする。
  • UserLAnd を起動して、Ubuntu をインストールする
  • とりあえずの node.js と npm をインストール
  • n をインストール(バージョン管理)
  • 安定版の node.js と npm をインストール
  • 最初に入れたとりあえずの node.js と npm をアンインストール
  • ログインし直し
  • 残った node.js と npm のバージョンを確認

Pixel に PlayStore から UserLAnd - Linux on Android をインストールする

Google PlayStore の UserLAnd をインストールする。

image.png

UserLAnd を起動して、Ubuntu をインストールする

image.png

とりあえずの node.js と npm をインストール

sudo apt install -y nodejs npm

n をインストール(バージョン管理)

npm install n -g

安定版の node.js と npm をインストール

n stable

最初に入れたとりあえずの node.js と npm をアンインストール

sudo apt purge -y nodejs npm
sudo apt autoremove -y

ログインし直し

userland@localhost: $ exit

残った node.js と npm のバージョンを確認

node -v
npm -v

他のバージョンをインストールする/切り替える

sudo n stable		# stable のバージョン
sudo n latest		# latest のバージョン
sudo n ls           # ローカルにあるバージョン
sudo n ls-remote    # リモートから取得できるバージョン
sudo n 22.17.0	    # v22.17.0に切り替え

さいごに

かんたんでしたね

リンク

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?