位元詩人 技術雜談:Unix is Friend - Unix Toolbox on Windows

Facebook Twitter LinkedIn LINE Skype EverNote GMail Yahoo Email

Sometimes there are no available desktop or laptop running Unix or Linux, but we miss these utilities on Unix. Thanks the efforts of numerous communities and companies; the utilities of Unix are ported to Windows in different projects. We'll introduce some of them.

Cygwin

Cygwin is a large collection of GNU and open source tools and a simulated POSIX layer on Windows. You may think Cygwin a self-contained mini Unix distribution within Windows. Even if you have no previous knowledge or expreience of Unix, you may view Cygwin an enhanced console with a variety of functionality. Your experience on Cygwin will also apply to future Unix or Linux use.

There are many things able to be done on Cygwin, including but not limited to:

  • Files and directories management
  • Text file editing with UTF-8 support
  • Publishing with LaTeX/TeX system
  • Programming in several languages, e.g. C, C++, Perl, Python, Ruby, Tcl
  • Version control system, e.g. CVS, subversion, git and mercurial
  • Scientific computing and statistics with R and Octave
  • Telnet, FTP, and SSH client and other network utilites, e.g. wget and curl

C and C++ programming in Cygwin is relatively limited compared with the numerous libraries on real Unix and Linux system. However, it is possible to compile some C or C++ libraries on Cygwin. Sometimes some modules of Perl, Python or other languages are written in C; thoses modules can be compiled and installed on Cygwin as well.

GNUWin32

For any reason you need original DOS box on Windows instead of Cygwin, take a look at GnuWin. This project has ported many Unix utilites onto Windows. The usages of these utilities is generally similar to their Unix comtemporaries. I won't dive into their usages since they are almost same in Unix and Windows.

Occationally, these utilities collide with Windows utilities of the same name. Some strange system problems may arise in this situation. Be aware of the problem.

Miscellaneous things

Many utilities have been ported onto Windows by different projects. Search them with search engines like Google. For example, search Emacs and Windows; you'll find Emacs for Windows. Sometiles their functionality vary in some degree to their Unix relatives due to system issues.

If you need a script language on Windows, you may use Perl in Cygwin, or acquire Perl for Windows. There are two major Perl implementations on Windows; they are StrawBerry Perl and ActivePerl. They have different licenses and supports. You may check these two Perl editions and choose one. If you prefer Python over Perl, there are also Windows binaries of Python available.

關於作者

位元詩人 (ByteBard) 是資訊領域碩士,專注於從探索到產品的開發過程,並以工具驅動的方式改善專案。喜歡以開源專案作為成果,回饋社群。

主要方向包括:自用工具的打磨 (dogfooding)、編譯器前端在工具開發中的應用,以及將研究轉化為可維護的開源成果。

除了技術之外,也喜歡日本料理和黑咖啡,偶爾自助旅行,將生活中的靈感融入技術隨筆。