25
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

wsl上でbashコマンドでUSBドライブをマウントしアクセスする方法

Last updated at Posted at 2018-11-12

wsl(Windows subsystem for Linux)上でCドライブ以外へアクセスするコマンドは、以下の通り。

bash shellコマンドでUSBをマウントするよ


sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d

※初期状態では/mntの中にはcドライブのディレクトリしか見当たらない!!

一連の流れ
  • /mnt配下にdディレクトリを作成するよ。
  • マウントコマンドでファイルシステムのタイプを指定するよ。drvfs
  • マウントしたいドライブを指定するよ。 D:
  • あらかじめ作成したディレクトの場所を指定するよ。 /mnt/d

usbが(E:)なら eディレクトを作成し、E:をマウントするようにするよ。

以上。

25
19
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
25
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?