If you are in the course are learning shell scripting, you need to use the Linux command to practice commands and scripts.
Your school may install a Linux lab, but you have not installed Linux laptops , but Windows computer like everyone else's. Your job needs to run Linux commands, you may want to know how to run the Bash commands and scripts on Windows.
You can install both Windows and Linux in dual-boot mode . This method allows you to choose when you start Windows or Linux computer. However, to run Linux commands use a separate partition of trouble may not be suitable for everyone.
You can also use the online Linux terminal , but you can not save jobs.
The good news is that there are several ways to run Linux commands in Windows, just as other conventional applications. Not cool?
Use Linux commands in Windows
As a Linux user and an enthusiastic promoter, I hope to see more and more people use "real" Linux, but I know that the problem sometimes, it's not a priority. If you just want to practice Linux to pass the exam, you can use one of these methods to run Bash command on Windows.
1, the use of Linux Bash Shell on Windows 10
Did you know that Linux distributions can run in Windows 10? Windows, Linux subsystem (WSL) allows you to run Linux in Windows. WSL upcoming version will use a real Linux kernel inside Windows.
This WSL also known as Bash on Windows, it as a regular Windows application running, and provides a command-line Linux distribution pattern. Do not be afraid command line mode, because your goal is to run Linux commands. This is what you need.
Ubuntu Linux inside Windows
You can find some popular Linux distributions in the Windows Store, such as Ubuntu, Kali Linux, openSUSE and so on. You just like any other Windows application, like download and install it. After installation, you can run all Linux commands required.
Linux distributions in Windows 10 Store
See Tutorial: install Linux bash shell on Windows .
2, using Git Bash Bash command to run on Windows
You may know Git what it is. It is composed of Linux creator Linus Torvalds version control system development.
Git for Windows is a set of tools that allows you to use Git on the command line and graphical interface. One of the tools Git for Windows is included Git Bash.
Git Bash provides emulation layer for the Git command line. In addition to Git command, Git Bash Bash also supports many programs, such as ssh
, scp
, cat
, find
and so on.
Git Bash
In other words, you can run many popular Linux / Bash command using Git Bash.
You can download and install Git for Windows tool in Windows to install Git Bash from its Web site.
◈ download Git for Windows3, using Cygwin command using Linux in Windows
If you want to run Linux commands in Windows, then Cygwin is a recommended tool. Cygwin founded in 1995, it aims to provide a run natively on Windows, POSIX-compliant environment. Cygwin is maintained by Red Hat employees and volunteers many other free and open source software.
Twenty years, Windows users use Cygwin to run and exercise Linux / Bash command. Ten years ago, I even learn Linux command Cygwin.
Cygwin
You can download Cygwin from the following website. I also recommend that you refer to the Cygwin memo to started.
◈ download Cygwin4, the use of Linux in a virtual machine
Another method is to use virtualization software and install the Linux. In this way, you can install the Linux distribution (with graphical interface) in Windows and like a regular Windows application to run it.
This method requires that your system has a large memory, at least 4GB, but if you have more than 8GB of memory, so better. The benefit here is that you can truly use the desktop Linux. If you like the interface, then you might decide later to switch to Linux .
Ubuntu Running in Virtual Machine Inside Windows
There are two popular tools can create a virtual machine on Windows, they are Oracle VirtualBox and VMware Workstation Player. You can use any of the two. Personally, I prefer VirtualBox.
You can follow on how to install Linux in VirtualBox with this tutorial .
to sum up
The best way to run Linux commands is to use Linux. When you choose not to install Linux, these tools allow you to run Linux commands on Windows. Try both and see what suits you.
via: https://itsfoss.com/run-linux-commands-in-windows/
Author: Abhishek Prakash topics: lujun9972 Translator: geekpi proofread: wxy
This article from the LCTT original compiler, Linux China is proud