LoginSignup
0
1

More than 1 year has passed since last update.

WindowsでUbuntuをもちいてLinux開発環境を構築する

Last updated at Posted at 2022-07-29

はじめに

windowsでubuntuを用いてhomebrew,nodebrewをインストール、nodeをインストールしてVSCodeでTypeScriptの環境構築を行うまで、調べたこと、作業したことをまとめました。
コマンドはすべて、WSL上で実行します。

Ubuntu、Homebrewをインストール

Ubuntuとは、Linux系のOS
Homebrewとは、パッケージ管理システム

  1. WSL(Windows Subsystem for Linux)の有効にする
  2. Ubuntuをタウンロード、セットアップを行う
  3. Homebrewをインストールする

参考記事
HomebrewをWindows上で使えるようにする
【完全版】Homebrewとはなんぞや

nodebrew、node.js、npmをダウンロードする

nodebrewとは、node.jsのバージョン管理ツール

  1. brew install nodebrew でnodebrewをインストール
    You need to manually run setup_dirs to create directories required by nodebrew:
    の後のコマンドを実行する(何が表示されたか記録できていませんでした、ごめんなさい)
  2. nodebrew install stableを実行し、nodeの安定バージョンをインストール
  3. nodebrew ls を実行し、インストールされているnodeのバージョンを確認
  4. nodebrew use v18.7.0 で使用するバージョンを選択(バージョンは各自の環境に合わせてください)
  5. export PATH=$HOME/.nodebrew/current/bin:$PATH でパスを通す
  6. node --version
    npm --version でnodeとnpmがインストールできていることを確認

参考記事
macOS に Node.js をインストールする手順 (nodebrew編)
Homebrewでnodebrew入れたらハマった
nodebrewでnodeのバージョン切り替え

Visual Studio CodeのターミナルをWSLにする

  1. Visual Studio Codeの拡張機能、Remote WSLをインストール
  2. ubuntuを起動させてログインする
  3. Visual Studio CodeのターミナルをWSLにする

参考記事
WSL2 + Ubuntu + VSCodeでの開発環境構築

TypeScriptの環境構築

1. 以下参考記事の「1-2. TypeScript環境構築」を参照

参考記事
github

0
1
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
1