Ubuntu Bash Console Windows 10

So use the Ubuntu Bash Console Windows 10

Microsoft had announced one of the great innovations of Windows 10: the ability to make use of a Linux console natively in the operating system thanks to the collaboration of Canonical, the company behind the Ubuntu development.

This option is available for a few hours thanks to the arrival of the compilation 14316 of Windows 10, which apart from other developments can start using the bash console Ubuntu directly in Windows 10. If Windows Insiders are and you are inside the ring fast updates, and you can apply that update and enjoy that easily console. This has been our experience to use this feature.

Ubuntu Bash Console Windows 10
Image Source: Google Image

Install option in 2 minutes

In Microsoft explain the process of installing this feature clearly and concisely. First we have to activate the “Developer mode ‘in Settings -> Update & security -> For developers.

Once this is done we will activate a new feature of Windows (‘Turn Windows Features on or off‘) and in the new window down until you see the “option Windows Subsystem for Linux (Beta)“. To activate and click on OK a message telling us to restart our computer will appear, so we accept to proceed with the restart process.

Once again we will have to run a Windows Powershell and once in writing ‘bash’ (without quotation marks) and press Enter. In doing so we will indicate that we have to accept the license terms of the image provided by Canonical Ubuntu, and if we do the system will proceed to download and install that image. When the process is finished we can close that window and we will have access to this new and unique application called “Bash on Ubuntu on Windows“.

Bash Ubuntu, so use the console in Windows

A Linux console on my desktop

If we go to the start menu and type ‘bash’ see how access to the application desktop. Clicking on that tool will appear a new window called ‘immediately Bash on Ubuntu on Windows‘.  What we have here is basically a full Linux system on your desktop Windows. Complete at least as a console, because there is no native access to a graphical interface.

As we explained in our technical analysis of this characteristic, what we have here is basically a Linux system (Ubuntu 14.04 LTS, in particular) that can control through the bash shell commands.

In the console we can do a lot of things we do in a bash terminal, but the beta status of this new feature does not all work? We check how it is possible to install several common packages. Encountering full access to the package manager APT is fantastic, and you can search for packages ( apt-cache search ) or install (apt-get install ) really quickly, and so is to update the list of packages and update distribution per.

This makes it possible to access the entire catalog of software distribution, although obviously only can run directly those applications (and games) that do not require a graphical user interface or be behind a windows server and desktop environments like GNOME or KDE, for example.

In our tests we installed and used without problems applications such as ssh, emacs or some games compatible with the library ncurses -ninvaders, nsnake- that are basic tests that can use these solutions directly to the console. Attention because we are using native Ubuntu package, i.e. exactly the same binary ELF 64we would use if we had installed the Ubuntu distribution (or any other 64-bit) on a separate partition.

You may also like to read another article on FreshLookApp: Eleven useful things you can ask Google Now

We also tried some more curious tools like Twitter turses client or web browser console as the legendary lynx in which the appearance of our web -and any other, of course- not have much to do with what you’re reading now . As we confirmed those responsible for Microsoft, each Windows drive (C :, D :, E :, etc.) is automatically mounted on this system subdirectories (/ mnt / c, / mnt / d, / mnt / e, etc.), but also have access to the file system of Linux from Windows: if we open a file browser in the “path C: \ Users [username] \ AppData \ Local \ lxss ” will have access to the file structure of our singular distribution “integrated” in Windows 10.

Obviously these tests are very basic and only allow us to verify that the console before us is functional. As warned those responsible for Windows, not everything is perfect. There are applications that directly problems or do not run. To us it happened to us by example by installing nginx – the package perfectly installed and the service seemed to start, but there was nothing running really- or try to use TMux , the known tool for working with several sessions of the shell at the same weather.

Actually these problems are normal for a solution that is in full development, but also this is intended to attract Linux developers in the world who want to work with their conventional environments under Windows system. Many of the tools for these experts are now available- the compiler gcc runs smoothly, for example, and Microsoft and we showed how Redis and other solutions were already sportscast- and others are in process – MySQL appears to some other problem- but what is clear is that this is only the first stage of a much longer way. One with surprises like this.

Yes, you can use graphical applications

Although Microsoft did not mention the support of a graphical interface natively,yes it is possible to run some graphical tools to verify that this could go much further in the future. Actually we do not have native support here, but we can make use of a “trick”.

It is installing some application that just creates a windows server in the background to be able to direct those graphics applications. There are several alternatives in this regard as Cygwin X, Vcxsrv or Xming, and all the principle is the same: a service creates the window server, from which we can use it as if we had a real one in our console bash Ubuntu in Windows.

The only thing left to do after installing one of those -we servers we tested with Vcxsrv- will set the appropriate environment variable with an ‘export DISPLAY =: 0‘ (no quotes) into the console. In doing so we can already install some basic applications with an ‘ apt-get install x11-apps ‘ and then try out some classic “toys” as xeyes and legendary tools like xedit.

That encourages one to do something more ambitious tests, and for example try to install some GTK tools like gedit and even a slight windowing environment such as xfceHere no luck, although it might just be a matter of trying to solve some problems because it is very likely to adjust these environments to this scenario it is not so complicated.

The conclusion after these first hours with the bash console Ubuntu in Windows 10 is that indeed this can be a very interesting alternative for those who want to work with this system command interpreter mode without leaving Windows 10.