How To Run Linux Apps From Bash On Windows 10 [Guide]
Ubuntu is coming to Windows 10. The Windows 10 Preview build 14316 lets you try it out. Ubuntu and Bash coming to Windows 10 is a big deal for developers simply because it means development will be considerably easier. The feature is still available only on the preview builds and we’re testing the waters to see what it can do. The one question that does arise is can you run a Linux app on Windows 10 now that it has Bash and Ubuntu? The answer is yes and here’s a complete guide on how to do just that.
Step 1: Run Bash on Windows 10. If you’re running Windows 10 Preview build 14316 but have never run Bash on it you likely haven’t enabled it. Here’s a guide on how to get Bash running on Windows 10.
Step 2: In order to run a Linux app on Windows 10, you will need to first run an X Server on it. There’s a whole host of options available for you; Xming, Cygwin/X, or VcXsrv Windows X Server. We used, and recommend, VcXsrv Windows X Server if you’re looking to do little to no trouble shooting or setting up. VcXsrv Windows X Server can be run right away while the other two options require some setting up. If you’re well versed with either of the other two, feel free to use them.
Step 3: Download and run VcXsrv Windows X Server. It will add an X icon in the system tray to show that it’s running and that’s all you need.
Step 4: Open Bash by searching for it via Windows Search or ask Cortana to open it.
Step 5: Download the app you want to run. We’re going to give you a few options because the apps that run are buggy and prone to crashes. Here’s a list;
Firefox
apt-get install firefox
Ubuntu X11 apps
apt-get install x11-apps
Gnome Control Center
apt-get install gnome-control-center
Run these apps one by one. At some point before the apps download you will be asked to confirm the download and installation. This is what it looks like. Type Y here and hit the enter key to proceed.
Step 6: Make sure VcXsrv Windows X Server is running (check the system tray for the X icon) and that you’ve successfully downloaded at least one app via the commands given up.
Step 7: You now need to export display to your local system. Switch to Bash and run the following command. Make sure you capitalize the word ‘Display’ as it’s part of the syntax.
export DISPLAY=:0
Step 8: Run the app you downloaded. Here are the commands to run each of the apps downloaded in Step 5.
Firefox
firefox
X11-Apps
This package has three apps inside it so run the following one at a time.
xeyes
xcalc
xclock
Gnome Control Center
gnome control center
The performance of these apps is far from optimal. Firefox crashes a lot and you might have to give it several tries just to get it running once. You can see in the screenshot above that while we got Firefox to open, we still received a sandboxing error. Sometimes an app will take up to a minute to actually appear on your screen once you’ve given the command. The bottom line is while you can get these apps running, using them isn’t going to possible just yet. You will find you’re terribly limited to which apps you can run at present.
You are likely going to have to wait for later builds or possibly the stable version of the Windows 10 Anniversary update to arrive before you can get much use of this.
Download VcXsrv Windows X Server
just a note, “gnome-control-center”