Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9261359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:07:41+00:00 2026-06-18T13:07:41+00:00

Running bash commands in cygwin produce the following error: $ ls ls: command not

  • 0

Running bash commands in cygwin produce the following error:

$ ls
ls: command not found

This is a question that I self-answered on my tech blog where I keep the tech-tips which I need to give to myself from time to time, so I decided to move it over here instead. The original blog post is here: http://thehacklist.blogspot.com/2009/04/cygwin-ls-command-not-found.html

If you are a linux enthusiast and really miss those greps and sed/awks on the windows box, you’ve probably installed cygwin. You tried running it either by double-clicking the cygwin icon on your desktop or the cygwin.bat file in your C:\cygwin directory and got the bash-3.X$ prompt. However, although the pwd or cd commands work, if you try ls, it says:ls: command not found.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T13:07:42+00:00Added an answer on June 18, 2026 at 1:07 pm
    1. Right click on "My Computer" -> Properties -> Advanced ->
      Environment Variables
    2. Add a new environment variable, called CYGWIN_HOME and set its value to C:\cygwin
    3. Edit the PATH environment variable and add %CYGWIN_HOME%\bin to it (usually separated by a ‘;’).
    4. Just click okay, exit any command prompts or bash shells (over cygwin) you may have open, and open it again – it’ll work!

    Assumption – this assumes that you have installed cygwin at C:\cygwin. If you’ve kept it someplace else, please modify the above accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following is a fragment of a bash script that I'm running under cygwin
I have a long running BASH script that I am running under CYGWIN on
Suppose we have a BASH script running some commands in the background. At some
When running commands from a bash script, does bash always wait for the previous
We have a system that has some Bash scripts running besides Java code. Since
I made this bash one-liner which I use to list Weblogic instances running along
Running my script through Devel::NYTProf showed that the following portion of code took up
I'm running Lighttpd on Cygwin. I have a Lua CGI script that calls a
I have a series of commands (calls to bash shell functions really) that compute
I really dont understand why this is happening, bash seems to remove commands while

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.