Around a year ago Microsoft released a Windows Insider Preview that included the ability to run a native Bash on Ubuntu. I was really excited about it, since I wouldn’t have to use things like Cygwin on my PC anymore and, more importantly, I could run any Debian package on my Windows machine. I immediately installed the Bash console, but I was disappointed within the first minute: basic commands like “ifconfig” didn’t work. I didn’t pay attention to Microsoft’s warning that the Bash console was in Beta.
A year and several releases later, the Bash console that I just tested on Windows version 10.0.15063 is much more complete to the point that a NetBeez agent can be installed on it.
Why is this important? It gives the ability to install a NetBeez agent on an actual user’s PC, so if you need to offer support or investigate any performance issues you can do it by getting data from the actual user’s machine. Below are the steps to install a NetBeez agent on Windows.
1. Activate Bash on Ubuntu on Windows 10
a. The first step is to turn on “Developer Mode” under Settings Update & Security -> For Developers -> Developer Mode
b. Control Panel -> Programs -> Turn Windows features on or off -> Windows Subsystem for Linux (Beta)
c. Type “cmd” on the Windows search bar (lower left corner) and type “bash” on the command line. Follow the instructions on the screen, and after a few minutes you will have Ubuntu installed on Windows 10.
You are ready to go with Ubuntu on Windows 10!
Next time you want to launch Ubuntu, just type “bash” on the search bar (lower left corner).
2. Sign up for your own NetBeez dashboard
This is the cloud dashboard that you will use to collect data from the NetBeez agent running on your PC. You can request a NetBeez free trial if you don’t have a dashboard.
3. Install the NetBeez Debian package on bash
a. Open a bash window as administrator (administrator privileges are needed to run the NetBeez agent).
b. Download the NetBeez installation script and install the Debian package.
More detailed instructions on how to install the NetBeez Debian package can be found here.
4. Configuration and Launch
Although the Ubuntu Bash is at a pretty good level in the Beta stage, we still need to make a small configuration in order to make everything work. We need to specify which interface to use for the NetBeez agent.
Run the command “ifconfig” on your bash console as follows:
From here you might see just one interface, ”wifi0,” above (excluding the loopback interface “lo” or multiple ones). Find the one you want to use for the NetBeez agent.
Open the file /etc/netbeez/netbeez-agent.conf and specify the interface by changing it from
{"host":"hostname.netbeezcloud.net", "secure_port":"20010", "model":"rpi-model-b"}
to
{"host":"hostname.netbeezcloud.net", "secure_port":"20018", "interfaces":"wifi0", "model":"rpi-model-b"}
Now you need to restart the NetBeez daemon with the following commands:
sudo service netbeez-agent stop; sudo service netbeez-agent start
And you will see the agent thumbnail on your dashboard:
The Ubuntu bash on Windows is still in Beta and it has some kinks that need to be ironed out. For example, it doesn’t fully support systemd and the NetBeez daemon doesn’t start by itself when you start a bash console. After you start the Ubuntu bash and as administrator (step 3.a) you need to start the NetBeez daemon with the command sudo service netbeez-agent start.
If you want to install a NetBeez agent on Windows 10 follow these steps and let us know how it goes. If you need help don’t hesitate to contact support@netbeez.net. We will let you know once this comes out of Beta and it’s ready for production.