Use the Linux Command cygwin on Windows

Source: Internet
Author: User
Technorati label: windows, linux, command

Like command line tools on Linux, such as grep and tail. If you want to use them on Windows, you can use cygwin and mingw to fulfill your wishes. But sometimes I think they are a little heavy, it is better to have a command ported to the Windows platform, fortunately I found a: http://unxutils.sourceforge.net/

Download the package, decompress it, and set the decompressed directory to the windows system Path (my computer> right-click Properties> advanced> environment variables> system variables> Path.

Another problem is bothering me. If you use commands such as mkdir and rmdir, you will find that the mkdir that comes with Windows is executed. I tried several ways to solve it:

  1. When setting the Path, set the decompressed directory before system32, such as Path = D: \ software \ unixOnwin32; C: \ WINDOWS \ system32; C: \ WINDOWS; C: \ WINDOW...
  2. Copy commands such as mkdir to system32 to overwrite the mkdir that comes with Windows.

Both methods failed. During the copy operation, we found that system32 did not have an executable program for commands such as mkdir and rmdir. What happened? The basic commands are implemented in cmd.exe, rather than searching External commands by path, including cd, del, dir, mkdir, rd, and so on.

However, if you must use mkdir for Linux, you must enable cygwin.

Cygwin

Right-click the directory to open the Console

C: \ cygwin \ bin \ bash -- login-c "cd '% 1'; exec bash -- rcfile ~ /. Bashrc"

Color Display of files listed by ls

Edit $ HOME/. bashrc

Alias ls = 'LS-hF -- color = tty '# classify files in color
Alias dir = 'ls -- color = auto -- format = vertical'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.