Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows powershell error #43

Open
zzzabc123 opened this issue May 25, 2024 · 3 comments
Open

Windows powershell error #43

zzzabc123 opened this issue May 25, 2024 · 3 comments

Comments

@zzzabc123
Copy link

when typing in : Invoke-WebRequest -Uri http://dsvr.blackeye.cloud/alld/blackeye.zip -OutFile blackeye.zip

cd blackeye
bash blackeye.sh

i get : cd : Impossible to find this acces path « C:\Users\msi\blackeye », for it doesn't exist.
At caracter Line:2 : 1

  • cd blackeye
  •   + CategoryInfo          : ObjectNotFound: (C:\Users\msi\blackeye:String) [Set-Location], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
    

bash : The term «bash» is not recognized as cmdlet name, function, file script or executable programm.
Check the spelling of the name or if a path exists, check the path is correct and try again.
At caracter line:3 : 1

  • bash blackeye.sh
  •   + CategoryInfo          : ObjectNotFound: (bash:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
@genius9999999
Copy link

when typing in : Invoke-WebRequest -Uri http://dsvr.blackeye.cloud/alld/blackeye.zip -OutFile blackeye.zip

cd blackeye
bash blackeye.sh

i get : cd : Impossible to find this acces path « C:\Users\msi\blackeye », for it doesn't exist. At caracter Line:2 : 1

  • cd blackeye
  •   + CategoryInfo          : ObjectNotFound: (C:\Users\msi\blackeye:String) [Set-Location], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    

bash : The term «bash» is not recognized as cmdlet name, function, file script or executable programm. Check the spelling of the name or if a path exists, check the path is correct and try again. At caracter line:3 : 1

  • bash blackeye.sh
  •   + CategoryInfo          : ObjectNotFound: (bash:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

Have you figured it out?

@zzzabc123
Copy link
Author

no

@Lexicon99k
Copy link

The error you encountered suggests that Windows PowerShell does not recognize the bash command because the Bash shell is not installed or properly configured in your system. Here's how you can resolve the issue:

Solution 1: Install Windows Subsystem for Linux (WSL) and Run Bash

If you want to run bash commands on Windows, you'll need to install the Windows Subsystem for Linux (WSL). Here’s how to set it up:

  1. Enable WSL:

    • Open PowerShell as Administrator and run the following command:
      wsl --install
      
    • This command installs WSL and the default Linux distribution (usually Ubuntu). If it's already enabled, it will update WSL.
  2. Restart Your PC.

  3. Run Bash Commands:

    • After installation, open the Ubuntu terminal (or your chosen distribution), navigate to the folder where blackeye.sh is stored, and run the command:
      bash blackeye.sh
      

    You might need to move the blackeye.sh file to your Linux environment if it's currently in your Windows directories.

THESE ARE WHAT YOU HAVE TO DO NEXT...

Now that you have Ubuntu installed and an account created, follow these steps to run your blackeye.sh script:

1. Navigate to the Folder Containing blackeye.sh

  • If the blackeye.sh file is stored in a directory on your Windows file system, you can access it from Ubuntu through the /mnt/ directory.
  • Windows drives are mounted under /mnt/, so:
    • C: drive is under /mnt/c/
    • D: drive is under /mnt/d/ and so on.

Example: If your blackeye.sh file is in C:\Users\DELL\blackeye, the equivalent path in Ubuntu is:

cd /mnt/c/Users/DELL/blackeye

2. Make blackeye.sh Executable

Before running the script, ensure it has execute permissions. Run this command:

chmod +x blackeye.sh

3. Run the Script

Now that the script has the right permissions, you can run it by executing:

./blackeye.sh

4. Install Dependencies (if needed)

If the script relies on any dependencies that aren't installed yet, you might get some error messages. You can use the following command to install missing packages in Ubuntu:

sudo apt update && sudo apt install <package-name>

Common packages that might be needed are git, curl, or wget.

After following these steps, your blackeye.sh script should run in the Ubuntu environment. It worked for me, if you run into issues, reach out to ChatGPT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants