【Windows10/WSL Ubuntu】exeファイルを実行する

スポンサーリンク

Windows10のWSL(Ubuntu)で、exeファイルの実行を試したので備忘録を残す。

【Windows10】WSL(Windows Subsystem for Linux)でUbuntuを使う
Windwos10 バージョン1709(Windows10 Fall Creators Update)からは、WSL(Windows Subsystem for Linux)が正式に利用できるようになった。 これは、Windows上でUbu...

追記(2018/05/15)

「Ubuntu 18.04」でも動くことを確認。

【Windows10】WSL(Windows Subsystem for Linux)で「Ubuntu 18.04」を使う
以前の記事で、Windows10のWSL(Windows Subsystem for Linux)で「Ubuntu」(16.04LTS相当)を動かした。 Microsoftストアを確認すると、先月リリースされた「Ubuntu 18.04 L...

Windowsアプリを実行してみる

拡張子.exeを指定すると実行できる。尚、そのまま実行すると、アプリ終了まで戻ってこないので & を付加するとよい。

メモ帳を起動

$ /mnt/c/Windows/System32/notepad.exe &

WZエディターを起動

$ /mnt/c/Program\ Files/WZ\ EDITOR\ 9/wzeditor.exe &

Windowsコマンドを実行してみる

PATHが通ってれば、そのまま実行ができるのでPATHを確認。

$ echo $PATH
/home/yoko/bin:/home/username/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Users/username/AppData/Local/Microsoft/WindowsApps:/snap/bin

ipconfigコマンドを試す

$ ipconfig.exe

Windows IP Configuration

Ethernet adapter C[Tlbg:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::dc93:zzzz:yyyy:xxxx%4
   IPv4 Address. . . . . . . . . . . : 192.168.xxx.62
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.xxx.1

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:0:4137:zzzz:yyyy:xxxx:6666:cccc
   Link-local IPv6 Address . . . . . : fe80::30d3:zzzz:6666:cccc%2
   Default Gateway . . . . . . . . . : ::

cmd.exeを呼び出す

exitで終了。

$ cmd.exe
Microsoft Windows [Version 10.0.16299.125]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>exit
exit
$

参考

  1. WSL その51 – BashからWindowsコマンドを呼び出すコマンドの実行例

コメント

タイトルとURLをコピーしました