Windows 10 can run Linux programs. Here's what you need to know to make the most of Windows Subsystem for Linux.

Last year, Microsoft added a new feature to Windows that is Linux support. Manage the Rich Turner program exchanged with CIO.com: The Windows Subsystem for Linux feature (WSL) - also known as Bash on the Windows operating system - is the creation of an infrastructure compatible with Linux running on and in Windows kernel. This means running Linux without leaving Windows.

Mr. Turner explains: "Bash on Windows provides a set of tools for developers, IT administrators and other technology professionals who want or need to run Linux command line tools along with tools and applications. of Windows " . Bash develops under the support of Canonical (and a large number of users in the Linux community). Bash was not born to turn Linux into Windows or Windows into Linux. It is just some popular Linux tools for development and can be used without running through a virtual machine. This is one of the reasons Mac is popular with developers: MacOS is based on BSD - an operating system derived from UNIX, so it can run Linux tools like Bash. And now you can do the same on Windows 10.

Running Linux on Windows 10 does not require a virtual machine, here are 18 things you should know Picture 1

Turner also explained: "When using Bash on Windows, developers can run genuine, genuine Linux command line tools in a highly compatible Linux environment along with their favorite Windows tools. ".

Mr. Turner said: WSL is growing rapidly and with Creators Update, it is very useful for everyday use. However, when you learn more about how Windows 10 and Linux interact with each other, using WSL will become easier.

  1. Instructions for accessing Ubuntu Bash files on Windows
  2. Ubuntu Bash tutorial on Windows 10

1. WSL is for developers

WSL was born to help Windows work better for developers who need to link to the Linux backend easily, or use the tools commonly available on Linux that are not available on Windows, or in the case of That tool has been compiled into binary files when you use Linux with the Linux file system. Turner calls it a great toolkit for any developer working on cross-platform solutions, especially those working on building websites, system services or hosting services.

2. WSL is a Linux distro, not a Linux system

WSL installs Linux distro on user computers (currently, Ubuntu 16.04 is a user-installed distro and automatically supported), although there will be more options in the future. The Linux program makes system calls as usual, but according to Turner, those system calls will go to Windows instead of Linux.Calls from the user command line tool interact with the OS system kernel. This means that you only need to install and use the Linux program without changing anything because you are using Windows.

3. WSL is not a virtual machine

When you run Linux on Windows in a virtual machine, you will have a separate operating system that ignores a lot of Windows. WSL uses less CPU and memory than many virtual machines. Because you are still in Windows, you can use Windows and Linux tools together on the same set of files. This means that WSL will operate in a virtual Windows system without worrying about nested virtualization.

4. WSL is not Cygwin (nix environment in Windows)

Cygwin is a library that provides users with a UNIX-like graphical environment within Windows, including the command line interface, and you need to compile the software specifically for it. With WSL, Linux programs open inside a standard Windows environment, so you don't need to change them to run on Windows.

5. Instructions for installing and starting WSL

You need a version of Windows 10 Creators Update 64 bit (version 1703 or later). First of all, open Settings > Update & security > For developers and enable Developer mode , then select the box marked Windows Subsystem for Linux (Beta) in the Turn Windows features on or off section of Control Panel (you can also type the word This key enters the advanced PowerShell window): Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux) . Start the computer, open a command prompt and type bash to download the Ubuntu image. This also creates additional shortcuts in the Start menu bar to launch bash. If it is the first time you are using it, you are encouraged to create a UNIX username and password (this is a different account than the Windows account).

6. You do not need an Admin account to use WSL

You need admin information to enable WSL but this is easy to do with DISM or other management tools, so developers don't need an admin account on a computer and can still use WSL when it is available. activated.

7. Symbolic links also do not need administrative rights

Windows supports symbolic links from the Vista version, but for security reasons, you must use advanced command marks to create and modify them. This causes problems for tools like Git and npm, using symbolic links when creating and restoring repos and packages. Like the Creators Update version, when you activate Developer mode , you don't need to improve the administrative form to work with symbolic links.

8. WSL is not simply bash

Bash is the way into WSL. It is always the first WSL process to run, if you close bash, all other Linux processes you are running will also close. However, you can use apt in bash to install Linux programs. You can use popular Linux tools like apt, sed, grep, awk, top, tmux and ssh or run developer tools like Vim, Emacs, git and the GNU Debugger (GDB). You can also run services like sshd, Apache, nginx, MySQL and PostgreSQL or language tools like npm for Node.js, gems for Ruby, Apache Maven for Java, Pip for Python or whatever tools you usually use on Ubuntu.

9. WSL is command line tools

WSL is designed to run command line tools, which is why it starts with the bash shell. But that does not mean that Linux graphical tools will not work. In fact, many tools work but that is the side effect of the work Microsoft is doing to support command line tools, not the presence of WSL. Microsoft did not do anything specifically to support running Linux graphics tools, but the company did not do anything to block users from running Linux graphics tools on WSL.

10. The Linux support add-on has improved the user interface.

To help the Windows console handle text formatting well for command line tools like Vim, Emacs and tmux, Creators Update has supported the ANSI and VT Sequences codes that UNIX and Linux tools use in delivery. their appearance. It also has 24-bit color instead of the old 16-bit color and better mouse support (needed for tools like Midnight Commander and Htop). These tools appear in all Windows command line interfaces, including CMD and PowerShell.

11. WSL does not cover Windows Server

WSL is only available in Windows 10 clients, not in Windows Server. So if you are using a virtual computer infrastructure or other Windows-based ways of running, you need to run a Windows client to use WSL.

12. Bash does not replace PowerShell

One reason that WSL is not included in Windows Server is because it is not designed to manage workloads such as Windows Server, Active Directory, IIS, Exchange, SharePoint, System Center, SQL Server, Hyper-V and Azure in a way that PowerShell works. PowerShell is a task automation and configuration framework. WSL does not change that.

13. You need to manage updates

WSL is updated regularly via Windows Update and Windows updates twice a year. But that does not update your Linux distro (according to feedback from most users). In order to own updates for Ubuntu and other Linux programs, you must run auto-get update (Microsoft also intends to add automatic update feature in the future).

14. You can manage WSL with regular Windows tools

A big advantage of WSL is that you can use the same network monitoring and management tools you used in Windows systems, which virtual machines often overlook. Turner explains: "When WSL uses memory, processes, networks, storage and existing IO stacks of Windows, the investments the company has made in protecting, managing and monitoring. Monitoring the OS is preserved and extended to help protect and monitor Linux processes " . "Although many other antivirus vendors have partnered with Microsoft to support WSL, but so far, Windows Defender is the only type of antivirus that works with WSL and process management," he said. Linux ".

15. WSL overcomes the connection with the Windows process

The Linux processes that you run with WSL are handled like other processes in Windows, so they show up in Task Manager, making it easy to abort any pending processes. This means that you can call Windows executable files inside bash by typing the full file of the program (remember the .EXE file, but you don't need to verify where the file exists if the file is in the path of Windows), or call the Linux program and get results from Windows applications. That means you need to start the batch files from bash by calling CMD.EXE, putting a command in bash into PowerShell to process or launching Visual Studio or calling MSBuild to complete the newly edited code on bash. Install RunInBash command line support to run Linux commands from PowerShell or CMD by typing $ in front.

16. WSL passes the connection to the Windows filesystem

With WSL you get the Linux DrvFs filesystem, the drives permanently attached to the Windows file system are automatically attached to it so you can access the files on the Windows system from the Linux tools you run. WSL even supports the Linux inotify service, which allows applications to register filesystem change messages, including files in the Windows filesystem and which can trigger commands such as restarting the server or building code. This means that you can keep that code where you can edit it using Visual Studio, use the same code as the Linux tool and see if everything happens automatically when changing the code.

17. You cannot open Linux files in Windows applications

Linux tools running with WSL can open Windows files but don't try to open files from the Linux file system in Windows applications. It will not work and may damage files.

18. You will want to access Windows Insider

WSL is still developing and continues to have new features such as connecting to Windows serial ports from Linux processes or being able to mount removable drives and share networks. These features are not available in Creators Update, but you can download them by running Windows Insider builds without waiting for up to six months for the next update.

The article "18 things to know about using Linux tools in Windows 10" was first published by CIO.

Did you find the article helpful? If there is anything to share, please comment below!

4 ★ | 39 Vote | 👨 18078 Views

Above is an article about: "Running Linux on Windows 10 does not require a virtual machine, here are 18 things you should know". Hope this article is useful to you. Don't forget to rate the article, like and share this article with your friends and relatives. Good luck!

« PREV POST
NEXT POST »