Bash on Ubuntu on Windows. The creators update and what we can do with this neat feature.

Installation Guide

Uninstall it and start anew

How to run Linux GUI apps with Bash on Windows

Update: New distro’s coming to Bash/WSL via Windows Store

April 11th passed and now we have another big update of Windows 10 called the Creators update. It adds a lot of new features but the most interesting one from a developer point of view is the Bash console.

Before the Creators update we had bash but it was at an early stage. People that wanted to play with it early had to register for Insiders update of their OS. Now all of us have the latest features with an official stable update.

The new linux subsystem now comes with Ubuntu 16.04 LTS which gives us a lot of new things and also the updated allows a lot more linux software to run.

My favorite update is the one that allows the file watchers to work. What that means is that nodejs apps like grunt, gulp and friends now just work. Of course there are other updates and fixes that allow a full development environment to be set using only the bash console. You don’t need to install the Windows alternatives of the apps you need. Just use bash and run apt-get install xxxx. Software like git, nodejs/npm, php, ruby can be ran under bash now.

One thing that needs improvement for me now is when I use browser sync, it cannot open the browser and I want it to open the default browser I set under Windows. However you can still open you browser and go to http://localhost:3000 and it works.

We’ll see in the near future how many console apps we can use. I personally want bash to be my default shell in every shell program and IDE I have and to run without problems with paths or environment: just like if using bash.exe for windows. I also need to check how mysql, mongodb, docker and similar software behaves. Still having everything that I use for web development under the bash console is way better than using ported to Windows software or a slow virtual machine.

My advice for you is to start using bash on Windows today, set up your own environment and report any error you have on their Github issues pages.

No Internet access from your Docker container? Check this out!

After a recent update I started having issues with my containers that hosted apps which were accessing the outside world periodically. At first I couldn’t understand where the problem is. I’ve been checking a lot Github issues without success and finally I remembered that I’ve made an update to my host which updated the kernel.

What I needed now is to find a way to boot with an older kernel selected by default. I started looking in Stackoverflow pages and blogs and found a way to set any kernel that I already have installed as the default one.

Here are the steps I took to fix my problem(my host is running Ubuntu linux):

  • check the /boot/grub/grub.cfg file for all available options you have. The name of every kernel installed is there. Pick one that is older than the latest installed. You have to look for entries like: “menuentry ‘Ubuntu, with Linux 3.13.0-113-generic'”. You will use the “Ubuntu, with Linux 3.13.0-113-generic” part
  • next open the /etc/default/grub file and look for the GRUB_DEFAULT entry
  • combine your kernel config name from point one from above with “Advanced options for Ubuntu” or “Previous Linux versions” for older Ubuntu versions (<14.04). You’ll have to have a similar string like this one now: “Previous Linux versions>Ubuntu, with Linux 3.13.0-92-generic”. Set GRUB_DEFAULT to this string like: GRUB_DEFAULT=Previous Linux versions>Ubuntu, with Linux 3.13.0-92-generic
  • you can use numeric values for GRUB_DEFAULT but it’s not recommended as the number will point to a random kernel config after the next update
  • save, run sudo update-grub and restart

Now you should have an Internet access from inside the Docker containers. This is just a temporary solution so don’t leave it like this, especially running with an older kernel. Better check you configuration and even reinstall everything on your host, use a newer linux distro, etc.

Source

Node.js v4.0.0 is here!

So we lived to see it. Node.js version 4 is here which means we have the latest V8, ES6 support and the latest security patches for our favorite tool! Well the previous statement cannot describe how much good things just happened. From the creation of Node.js, through the fork of IO.js, until finally the latest version and the merger happened and now the community has the word how Node.js will be shaped from now on.

I am personally very excited about that and I am currently going to test and update one of my Docker apps that installs and uses Node.js through NVM.

I am also expecting a lot of work on this major version and the patches and new features are coming sooner than later which makes it very interesting to use Node.js these days!

Enjoy!

How can you tell if a programmer knows Docker in 5 questions? | The Snap.hr Blog

Source: How can you tell if a programmer knows Docker in 5 questions? | The Snap.hr Blog

I struggled only on the last question about the difference between AUFS and DeviceMapper but these kind of questions always help me to find what I have to know to pass them. And I love to learn new things!

An introduction to JavaScript-based DDoS | Cloudflare blog

Source: An introduction to JavaScript-based DDoS

It was not long ago when a similar attack happened against GitHub. I hope in the near future such things become very hard to do for the average hacker and the clever people will prefer to be white hats.

How To Use npm to Manage Node.js Packages on a Linux Server | DigitalOcean

You already used npm to install some node packages. Now it’s time to improve on that, get some new skills and start using it in a better way:

How To Use npm to Manage Node.js Packages on a Linux Server | DigitalOcean.