Showing posts with label Windows10. Show all posts
Showing posts with label Windows10. Show all posts

Friday, April 29, 2016

How to Enable the Linux Bash Shell in Windows 10

http://www.laptopmag.com/articles/use-bash-shell-windows-10


Linux geeks rejoice. As of build number 14328, Windows 10 allows you to run a special flavor of the Bash shell (on Ubuntu) in a window. Using Bash, you can navigate around the file system, install and run Linux command line apps like the vi text editor or, with some unofficial tweaks, try to load windowed programs. However, before you can use Bash in Windows 10, you have to turn it on. Here's how.
1. Navigate to Settings. You can get there by clicking the gear icon on the Start menu.
Click gear icon for settings
2. Click Update & security.
Select update & security
3. Select For Developers in the left column.
For developers
4. Select Developer Mode under "Use developer features" if it's not already enabled.
Use developer features
5. Navigate to the Control Panel (the old Windows control panel). You can get there by hitting Windows Key + X and selecting Control panel from the pop-up menu that appears.
select control panel
6. Select Programs and Features. If it's not visible, make sure you select "Large icons" from the "View by" menu.
select programs and features
7. Click "Turn Windows features on or off."
Turn windows features on or off
8. Toggle "Windows Subsystem for Linux" to on and click Ok.
Toggle Windows Subsystem for Linux to On
9. Click the Restart Now button.
click restart now
10. Search for Bash in the Cortana / Search box and click its icon.
bash shell
11. Type "y" and hit Enter when promoted to install Ubuntu. The system will then take a few minutes to install Ubuntu in the command prompt window.
type y
12. Create a username and password.
Enter username and pwd
You can now use the Bash shell as if you were on a a computer with Ubuntu installed as its primary OS. There are a few command line apps built-in, including the vi and pico text editors, and you can add more by using the apt-get command. There's also a program which allows you to run windowed Ubuntu apps in Windows 10.

Friday, April 15, 2016

Microsoft is adding the Linux command line to Windows 10

http://www.theverge.com/2016/3/30/11331014/microsoft-windows-linux-ubuntu-bash?utm_campaign=theverge&utm_content=article&utm_medium=social&utm_source=facebook


https://channel9.msdn.com/Events/Build/2016/P488/player


Microsoft is reaching out to Linux developers in a way that the company never has before. "The Bash shell is coming to Windows. Yes, the real Bash is coming to Windows," said Microsoft's Kevin Gallo on stage at today's Build 2016 keynote. The announcement received an uproarious applause from the crowd. The new functionality will be enabled as part of this summer's Anniversary Update to Windows 10.
"This is not a VM. This is not cross-compiled tools. This is native," he said. "We've partnered with Canonical to offer this great experience, which you'll be able to download right from the Windows Store." Third-party tools have enabled this sort of thing for years, but a direct partnership between Microsoft and Canonical should offer even more flexibility and convenience for developers who prefer using these binaries and tools.
More importantly, it represents Microsoft's refreshing stance on open-source development. VP Terry Myerson teased "more coming soon" in regards to other possibilities signaling a modernized and extremely open Windows 10. This blog post by Microsoft's Scott Hanselman offers a deeper explanation of the move. "This is brilliant for developers that use a diverse set of tools like me," he said. "This is a genuine Ubuntu image on top of Windows with all the Linux tools I use."

Update: Microsoft has posted a very in-depth video covering Bash on Windows, which we've embedded at the top of this article. It should answer just about any question you might have.


Windows 10's Bash shell can run graphical Linux applications with this trick

http://www.pcworld.com/article/3055403/windows/windows-10s-bash-shell-can-run-graphical-linux-applications-with-this-trick.html


Microsoft said it wouldn’t support graphical applications in Bash on Windows. But enterprising geeks like w2qw on Reddit have already figured out how to run graphical applications with Bash on Windows 10. The underlying code is much more capable than Microsoft initially let on.

Install an X server

This is possible because the Bash shell for Windows is more than just a shell. Microsoft built an entire “Windows Subsystem for Linux” that allows Windows 10 to natively run Linux applications, even graphical ones. Install Bash for Windows 10 and you’ll actually have a complete operating system layer for running Linux applications and a full Ubuntu userspace environment—that is, everything above the Linux kernel.
The only missing piece is an X server that allows those graphical applications to appear on your Windows desktop. This is basically the same technique people would use to run graphical Linux desktop applications over a network.
The Xming X Server for Windows works well for this, although there are other X servers for Windows and they should also work. Download and install it on your Windows 10 PC to get started. You can just use the default settings and it’ll work fine. Launch Xming and it will appear in your system tray, running in the background and waiting for you to launch a graphical Linux program.
Windows 10 running Linux desktop applications. w2qw
This is Windows 10 running Linux desktop applications.

Launch applications from Ubuntu’s Bash shell

You’ll now need to install a graphical application, which you can do with the standard apt-get command in the Bash shell environment. The apt-get command has access to Ubuntu’s entire software repositories, so you can use it to install graphical applications without any additional tweaks.
For example, to install the Linux version of Firefox from Ubuntu’s repositories, you’d just run the following command:
apt-get install firefox
Once you’ve installed the program, you can specify the X server and then launch the application. For example, to launch Firefox, run the below commands. (To launch another graphical application, just specify its name instead of “firefox.)”
export DISPLAY=:0
firefox
Assuming you’re running an X server like Xming on your Windows PC, the graphical application should run. It may not run as speedily—applications can’t use direct rendering to run on your hardware directly.
This is currently a bit unstable. Many applications I tried were unable to run reliably. Some people report better success. But bugs are no surprise, as the Windows Subsystem for Linux is beta and this is its first release. As Microsoft improves the underlying code, applications—even these graphical applications—should work better and better over time.