Using Unix command on dos prompt

Posted on 2004-09-15
Medium Priority
Last Modified: 2012-06-27
I installed cygwin but it gives a new window (shell) to use unix commands on. How can I use unix commands like "ls" etc on windows dos prompt? Is there some setting in cygwin that allows that? Any other tool for this?
Question by:sambha03
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
LVL 40

Expert Comment

ID: 12071041
Unix uses a different command interpreter than windows...  I believe that you must use the one that came with cygwin...  Unix commands have a completely different context than DOS commands, although the output is pretty much the same...  (Ls = Dir)

Author Comment

ID: 12071054
I've seen someone use some basic commands like ls, cp etc in dos prompt. There must be some tool for it or it must be possible to configure cygwin to support some basic commands in windows prompt
LVL 40

Expert Comment

ID: 12071170
This may be of help here:


I am not a Unix guru by any means, but that article seems to make some sense..  :)
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.


Author Comment

ID: 12071172
The link is not working
LVL 38

Expert Comment

ID: 12072194
After cygwin is installed, you need to add the Cygwin\bin directory to your PATH, (eg
put it in autoexec.bat file, or just manually add it to PATH, then you can you the *nix
LVL 38

Expert Comment

ID: 12072216
also have a look at "The Cygwin FAQ":

Accepted Solution

ITcrow earned 1000 total points
ID: 12073069
I agree with Yuzh.

To add path:
set path=%path%;c:\path\to\cygwin\bin

Verify that your path got added:

If you see the path you added as the last item in the result, then you are good to go.
Try using any cygwin commands. ls, cp, etc.
LVL 24

Expert Comment

ID: 12078892
Try cd command, change directory, same for both systems, but like MD they remain different for rules and syntax. Ans is to give it up.

Dos is os, which is different than unix, so it cannot and will not run unix command. It is more primitive, so aside from running of similar programs externally such as FTP or Ping, you cannot run alternative internal commands.  It does not work same in other way, for with unix flexibility already built in, you can more easily change how what command does what.   Slash vs backslash, dash vs slash, remains a typical syntactical problem for internal OS process.

So better imo keep them as separate, know which window does what, or without windows, know which OS was booted.

> you need to add the Cygwin\bin directory to your PATH

unfortunately, too easy to overload path and be misinterpreted.  For beginners, better i think to have a command window open directly to the subdirectory containing the programs to be run.  This is done easily enough by first creating a shortcut icon to open a command window (or cmd) and then assign the default subdirectory to begin running in, just as location for cygwin proggies.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question