If your anything like myself chances are you probably use a combination of both GNU/Linux and Microsoft Windows for your operating systems of choice. Whilst both systems are awesome and provide their own unique features sometimes it can be annoying when you boot into one OS and need tools in another.
Sure you could just go out and set-up a virtual machine but that would be overkill if you only needed to use a single tool, inside of Linux you can just open up WINE and run most Windows apps, however achieving this on Windows for Linux apps is a little more difficult. In this tutorial we will explore some of the solutions in which you can try to migrate some of your Linux favorites over to Windows.
Option 1: Cygwin
When it comes to a reliable contender you can’t look past Cygwin, novices and power users will appreciate this program as it provides a somewhat close Linux environment on your Windows operating system. Cygwin allows you to choose a number of different GNU/Linux packages during installation which include tools such as Wget, Gzip, Cat and many more utilities. Cygwin can then be launched and works similar to CMD or Powershell although it will only accept UNIX command syntax such as ls, pwd or cat.
Despite the flexibility of Cygwin it is worth noting that it is in no means a complete solution to running every Linux tool on Windows. In order to fully take advantage of Cygwin’s functionality you must re-compile the source code for your application yourself in order for it to work. The Cygwin software also allows you to use the “make” and “make install” command to compile your own tools from places like Github making it very popular amongst developers and advanced users.
To get started head over here and install Cygwin by downloading and launching the main setup.exe file. Next choose install from internet and then choose your installation directory, you will also be asked to pick a mirror to download the files, choose any but preferably a location closest to you.
Next you can choose all the packages you want and click next to begin the long process of downloading, extracting and then installing Cygwin. If you missed a tool or want to install a new package simply re-launch the installer and repeat the steps to install the desired package. This can be done as many times as you like without affecting Cygwin so keep the installer file handy in case you need to add stuff later on.
After this you can find Cygwin as a shortcut on your desktop which can be launched like any other program installed, once inside you can type away and enjoy using your new command-line tools. All files relating cygwin including your home folder can be found in: C:\Cygwin\home\username or if you installed it to another drive it will be there instead.
Option 2: GNUWin32
While Cygwin is great for compiling your own tools many of us are not programmers but may like to use certain tools that are normally only available to any UNIX like OS such as Linux, BSD and others. GNUWin32 aims to solve this by focusing on a collection of GNU utilities which have being successfully ported to the Windows platform, this is somewhat limiting compared to Cygwin but does offer a wide selection of per-configured packages to use.
To get started download the main .exe file from SourceForge here once downloaded move the file to your desktop or another easily accessible location. After that double click the .exe and it will extract the GNUWin32 folder to that location. A window will appear just click next and accept to begin the download process, this will download a folder called “GNUWin32” to your desktop.
Next up open the folder and hold Shift on your keyboard, and right click inside the folder, now you can let go of shift and click on “open command window here” now a command prompt window should open up. At this stage simply type “download.bat” and press enter this will then begin the process of downloading and installing all of the necessary utilities and libraries.
After the long installation is finished you should see the some text in command prompt confirming the process is complete. At this stage simply type “install C:\gnuwin32” this will then unzip all the packages to the root of your C drive. You can change this to another location if needed but the C drive is recommended, now you have a complete shell with GNU ports available to you.
In order to run the commands navigate to “C:\gnuwin32\bin”and then hold shift and right click then choose “open command window here” to launch CMD. Now you can type all your UNIX commands and interface with the tools such as wget and grep.
All in all this is a handy tool to help out when running tools such as wget or common commands like grep, unlike Cygwin which requires one to compile their own scripts to make full use of the software GNUWin32 aims to provide pre-configured ports that don’t rely on extra libraries and work natively on Windows.
Option 3: AndLinux:
While the other two solutions focus on providing a shell or ported utilities Andlinux focuses on providing a seamless experience of Ubuntu along with some of the usual Linux favorites. This also includes programs with full graphical interfaces that seamlessly integrate into Windows when used and can be found in right click menu’s and launched from the main program itself.
By right clicking on the menu tray icon you get a complete list of all the available packages to use, the only major drawback with this program is compatibility, to date this program works from Windows XP – Windows 7 (32 bit only) which leaves the massive amount of 64-bit machines in the lurch. Until further development is done I personally don’t see this as a viable option unless you have an older machine running a 32-bit OS.
All in these utilities have being created to help ease the switch when using Windows and keeping some of your favorite Linux tools which can be very handy in different applications. However for some tasks these may just not cut it and require you to use a virtual machine or dual boot but for the most part they handle the job rather well.
Other posts you may like:
Alessio Rigoli is the founder of AGR Technology and got his start working in the IT space originally in Education and then in the private sector helping businesses in various industries. Alessio maintains the blog and is interested in a number of different topics emerging and current such as Digital marketing, Software development, Cryptocurrency/Blockchain, Cyber security, Linux and more.
Alessio Rigoli, AGR Technology