Windows 10: with Ubuntu Bash Console how to use it - TechnoTron

Posted by: TechnoTron 2/28/2017
Source:    Xataka                                                                                                                                                    


Ubuntu Bash Console
In April 2016 Microsoft had announced one of the great new features of Windows 10: the possibility of using a Linux console natively in this operating system thanks to the collaboration of Canonical, the company responsible for the development of Ubuntu.




That option is available thanks to the arrival of the compilation 14316 of Windows 10, in which apart from other news we can start using the bash console of Ubuntu directly in Windows 10. If you are Windows Insiders and you are inside the ring of quick updates, You can now apply that update and enjoy that console easily. This has been our experience in taking advantage of this feature.





Install option in 2 minutes




Microsoft explains the process of installing this feature in a clear and concise manner. First we will have to activate the 'Developer mode' in Settings -> Update & security -> For developers.



Bash1
Once this is done we will activate a new Windows feature ('Turn Windows Features on or off'), and in the new window we go down until we see the option "Windows Subsystem for Linux (Beta)". 



Bash8When activated and click OK will appear a message that tells us that we must restart our computer, so we accept to proceed to that process of restart.

Once again in Windows we will have to execute a Powershell and once inside write 'bash' (without quotes) and press Enter. Doing so will tell us that we have to accept the license terms of the Ubuntu image provided by Canonical, and if we do, the system will proceed to download and install that image. When you finish the process we can close that window and we will have access to that new and unique application called "Bash on Ubuntu on Windows".



A Linux console on my desktop




If we access the start menu and write 'bash' we will see how the access to that desktop application appears. Clicking on that tool will immediately appear a new window called 'Bash on Ubuntu on Windows'. What we will have there is basically a complete Linux system on our Windows desktop. Complete at least as a console, because there is no native access to a graphical interface.




Bash13What we find here is basically a Linux system (Ubuntu 14.04 LTS, in particular) that we can control through the shell interpreter.



In that console we can do a lot of things we do in a bash terminal, but the beta state of this new feature makes everything not work. We check how it is possible to install several common packages. Finding total access to the APT package manager is fantastic, and it is possible to search for packages (apt-cache search) or install them (apt-get install) really fast, as well as update the package list and update the distribution per se.




Bash14



Thanks to this it is possible to access the entire software catalog of the distribution, although obviously we can only execute directly those applications (and games) that do not need a graphical user interface or behind a server windows and desktop environments Such as GNOME or KDE.



Bash15



In our tests, we install and use applications such as ssh, emacs or some games compatible with the ncurses library - ninvaders, nsnake - which are basic tests that can be used directly in the console. Note that we are using native Ubuntu packages, that is, exactly the same ELF64 binaries that we would use if we had installed the Ubuntu (or any other 64-bit) distribution on a separate partition.



Bash11




We also tried some more curious tools such as Twitter client turses or console web browsers like the legendary lynx in which the look of our website - and of any other, of course - does not have much to do with what you are reading now . As we have been confirmed by Microsoft, each Windows drive (C :, D :, E :, etc) is automatically mounted on this system in subdirectories (/ mnt / c, / mnt / d, / mnt / etc) But we also have access to the Linux file system from Windows: if we open a file explorer in the path "C: \ Users \ AppData \ Local \ lxss" we will have access to that file structure of our Singular distribution "integrated" in Windows 10.



Win1



Obviously these tests are very basic and only allow us to verify that the console that we have before us is functional. As the makers of Windows warned, not everything is perfect. There are applications that give problems or that do not directly execute. To us it happened for example when installing nginx - the package was installed perfectly and the service seemed to start, but nothing was really running - or when trying to use tmux, the well-known tool to be able to work with several sessions of the command interpreter to the same one weather.




Actually these problems are normal for a solution that is in full development phase, but is also all this is designed to attract Linux developers who want to work with their conventional environments under a Windows system. Many of the tools for these experts are already available - the gcc compiler works without problems, for example, and Microsoft already showed us how Redis and other solutions were already supported - and others are in process - MySQL seems to give some problem - , But what is clear is that this is only the first stage of a much longer road. One with surprises like the next.



Yes, it is possible to use graphical applications




Although Microsoft did not talk about the support of a graphical interface natively, it is possible to execute some graphical tools to be able to verify that this could go to much more in the future. Actually here we do not have native support, but we can use a "trick".



Bash17



It is to install some type of application that precisely creates a server of windows in the background to which to be able to direct those graphic applications. There are several alternatives in this sense like Cygwin X, Vcxsrv or Xming, and in all of them the principle is the same: a service creates that window server, from which we can take advantage of it as if we had a real one in our console bash of Ubuntu In Windows.







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




That encourages one to do some more ambitious testing, and for example we try to install some GTK tools like gedit and even a lightweight windows environment like xfce. There was no luck here, although it may just be a matter of trying to solve some problems because it is very likely that adjusting this type of environment to this scenario is not so complicated.

Comments

Popular posts from this blog

Twitter: change your profile image by default, the end of snake eggs - "TechnoTron"

WhatsApp: discover if you are spied on when using WhatsApp Web