Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
57 views

Why executing 'bash' in the terminal opens wsl on Windows 10?

When I run the 'bash' command in the terminal, my console automatically switches to the 'wsl' mode. Why is this happening and how do I stop this behavior? It causes problems when I run other scripts, ...
Andrii Hnatushchenko's user avatar
0 votes
0 answers
1k views

Bash - node: command not found when being run in a shell script

When trying to run a node command from a .sh script I get the error node: command not found, however I can see that node is installed, running node -v shows me my current version, what could be the ...
Danyx's user avatar
  • 101
-1 votes
1 answer
52 views

tsunami windows 10 curl java home environment variable error

I am setting up tsunami on Windows 10. I am following the tutorial (https://github.com/google/tsunami-security-scanner). When I run the bash command, I get the following error: ERROR: JAVA_HOME is not ...
noob832947's user avatar
0 votes
1 answer
294 views

Tortoise Git not using id_rsa

I use Tortoise Git on Windows 10. When I push it asks me password although I do have %userprofile%\.ssh\id_rsa file. I also tried to use git from command line (Git bash). If I google I get instructed ...
user1787194's user avatar
2 votes
2 answers
6k views

In Windows Terminal, how do I add bash as one of the shell options?

I'm using Windows 10 and just downloaded and installed the latest version of Windows Terminal. I would like to use a bash shell within the terminal but when I open the settings, I don't see bash as ...
Dave's user avatar
  • 124
1 vote
1 answer
139 views

script to restart process on Debian WSL

I have amule-daemon installed on Debian 11 WSL. Process amuleweb crashes every now and then so I need to restart it. I'm trying to automate this with the following bash script: #!/bin/bash if [[ $(...
roughnecks's user avatar
0 votes
1 answer
462 views

windows 10 tries to run shell scripts from "C:\Windows\System32" directory

I have some bash scripts that I wanted to use like batch files in windows 10 by double clicking and let it to finish the job. Problem is it starts the script from windows system (C:\Windows\System32) ...
tansy's user avatar
  • 176
1 vote
0 answers
883 views

process exited with code 1 (0x00000001) after Git update 2.36.1 on Windows 10

After I tried to update my Git version to 2.36.1, on my Windows 10 machine I've been getting this error in the Windows terminal: [process exited with code 1 (0x00000001)] I have tried to check for ...
Krullmizter's user avatar
3 votes
1 answer
6k views

How to parse each line of a text file as an argument to command prompt in Windows?

I'm looking to write a script for Windows Command Prompt that takes a .txt (filename) as an argument, reads the file line by line, and passes each line to a command. If my FILE.txt looks like: LINE1 ...
GIRISH's user avatar
  • 31
1 vote
0 answers
833 views

bash: patch.exe: Permission denied; how to turn off security regarding 'patch' in program name in windows 10?

I stumbled upon a problem patching a .diff file using patch. I use bash under windows 10 and the result of of this operation is as follows: $ patch < patch.diff bash: /cygdrive/c/cygwin/bin/patch: ...
tansy's user avatar
  • 176
0 votes
1 answer
60 views

Refining a simple delete-item one-liner

so I was wanting to upgrade my delete-item one-liner. I want to breakup the main filepath(\HQDEVAPP004\C$\LoneStar\ProcessorHandlers\Test) into 2 variables that are defined at the top of the script. ...
Zero596's user avatar
  • 83
1 vote
2 answers
8k views

Open git bash in current directory

Previously when I was in a directory, I clicked 'git bash here' and it would open in that directory. Now it opens my home directory. How can I fix this?
Joeri's user avatar
  • 11
3 votes
1 answer
938 views

How can I play a sound when my Git for Windows Bash command prompt is ready?

I use the shell Git for Windows Bash on Windows 10 and I want to play a sound whenever my command prompt is ready. This acoustic feedback should help me to get (back) to my command line when my ...
Frizelbliz's user avatar
4 votes
2 answers
1k views

Git subtree installation broken on a Windows 2010 Pro install

Something I'm unable to track down the source of my broken my Git “subtree” command. I'm running Windows 2010 Pro. Here the error message, instead of display the help info: $ git subtree It looks like ...
gsscoder's user avatar
  • 143
0 votes
0 answers
244 views

how to save outputs from a .sh script in windows folder?

I have this piece of code, it converts process a .shp file and run few lines with the original saving an output and subproceswith different name and saving them in a new folder (build), it works ...
jr.gcj's user avatar
  • 101
1 vote
1 answer
5k views

Bash on Windows 10 does nothing and goes back to command prompt

Just today bash on my Windows 10 machine has completely stopped working. Running bash from the command prompt results in about a one second pause, and then returns immediately back to the command ...
Lemonseed's user avatar
  • 111
2 votes
1 answer
2k views

How do I stop a screen capture with FFmpeg under Windows in a bash script?

When I capture the screen with ffmpeg -i desktop in a Bash script under Windows, I cannot end the capture with taskkill /f, because then FFmpeg won't write the MP4 header. It has to be shutdown with ...
elsamuko's user avatar
  • 281
0 votes
1 answer
298 views

Run a series of programs with one command on Windows10

I have an executable that requires user inputs. I would like to be able to put several commands in a file (call it run.sh), each for different inputs passed to the program, something like: program ...
user1273388's user avatar
2 votes
1 answer
525 views

can't start docker via wsl powershell command but can start it in Ubuntu

I'm running WSL2 / Ubuntu 20.04 / Windows 10. When I type sudo bash -c 'dockerd &' in Ubuntu 20.04 / bash dockerd starts. When I type wsl sudo bash -c "dockerd &" in PowerShell ...
neubert's user avatar
  • 7,204
5 votes
1 answer
721 views

Launch a WSL script through Windows Terminal: node: command not found

I am trying to run a node.js script in WSL from WT using the syntax wsl.exe <command>. However I can't get it to find Node when launched this way and get the following : PS C:\> wsl.exe -- ...
xShirase's user avatar
  • 151
0 votes
2 answers
962 views

Change home directory

I'm trying to access a folder with a bunch of files via cd $HOME_KADATH however I'm thrown into my 'normal' home directory. Is there anyway to change the home directory to the one above instead? This ...
Linus's user avatar
  • 1
0 votes
1 answer
1k views

Windows 10 symbolic link: bash vs cmd

I have a single bash script that I use to launch many programs. I called this script launcher.sh To use it, I create a symbolic link named myprog pointing to launcher.sh. While in BASH shell (MSYS2/...
gsal's user avatar
  • 1
0 votes
0 answers
281 views

Back up directory with symbolic links from a Unix server to Windows 10 PC

I have a directory with a few terabytes of data on server A (unix system, with many symlinks) that I want to back up to my PC (windows 10 system) as my access to server A is going to end soon. In the ...
Jacek's user avatar
  • 101
0 votes
0 answers
596 views

Run script from context menu on file with spaces in filename on windows 10

I have a right click context menu to rename files. This is created by importing the following to the registry: [HKEY_CURRENT_USER\Software\Classes\*\shell\add_date] @="Add date to filename" ...
Vasco's user avatar
  • 101
4 votes
0 answers
632 views

How might a bash.exe appear in system32 of Windows 10? [closed]

I just discovered that running bash on one of my Windows machines launches a bash terminal. Apparently this is running a bash.exe in Windows/system32. I'm assuming Win10 does not by default come with ...
James Ronald's user avatar
0 votes
0 answers
667 views

Open PHP Storm on bash command-line without output

Since hours I'm trying to run my phpstorm from commandline, without having any output at all. Reason: Every day when I come to work, I have multiple tools to start... 2 different vagrant machines, ...
Dwza's user avatar
  • 93
1 vote
1 answer
754 views

Windows 10 WSL bash change starting directory

When I launch bash on Windows, it always starts in the directory that it is launched from [/mnt/c/Users/myuser], however I would like it to launch in the WSL $HOME directory [~]. How do I specify the ...
BugSquanch's user avatar
  • 1,984
5 votes
0 answers
459 views

Files with long filenames appear as empty

I'm not too familiar with Windows, so please bear with me. I have a folder with several files with very long filenames, that can be listed normally, but if I try to open them with any Windows ...
lhpcw's user avatar
  • 51
1 vote
0 answers
46 views

What gets executed when you don't specify the extention on the command line?

I installed uglifyjs node package. It got installed into the C:\Users\sam\AppData\Roaming\npm folder which happens to be in the PATH, so that I could execute it from anywhere. To understand what ...
AngryHacker's user avatar
  • 18.7k
2 votes
1 answer
3k views

How to access a folder over SSH between 2 Windows 10 computers

I'd like to use bash in windows 10 to establish SSH tunnel and mount remote folder to a local one. Until now I've been using Ubuntu in VirtualBox on each Windows machine, run sshfs server and then ...
ThomasHunter's user avatar
1 vote
1 answer
4k views

How do you make .sh files open with Windows Terminal Ubuntu?

I really like coding in bash, but there used to be many limitations of bash functionality in Windows. Though now there are many benefits to the bash windows users now rather than how it was pre ...
Nationalism's user avatar
16 votes
2 answers
34k views

Where are config files located in WSL?

According to this answer global/system config files are generally stored under /etc in linux. Is this also the case for WSL? If so where is the /etc equivalent directory located, as I was unable to ...
MShakeG's user avatar
  • 327
0 votes
0 answers
92 views

Does all WSL data/memory fall under the same parent directory?

I would like to know whether all WSL memory/data is located under the same parent directory. This data would include all deb package installations in addition to the main WSL installation. For example,...
MShakeG's user avatar
  • 327
1 vote
2 answers
5k views

WSL2 no longer starting with bash colors

Until today when I started WSL2 with Ubuntu on Windows, I would get the pretty colors of the bash terminal. I think with today's update that no longer happens. Instead, the shell starts uncolored. If ...
Ryan's user avatar
  • 3,835
3 votes
1 answer
11k views

Convert UNC path to WSL path

I created an alias as part of this question. It functions as expected except that whenever it's run from the home directory it outputs a non-fatal error: '\\wsl$\Ubuntu-18.04\home\hashim' CMD.EXE was ...
Hashim Aziz's user avatar
2 votes
2 answers
5k views

Alias CMD command from WSL2 shell

I'm running WSL2 on Windows 10, and I want to be able to run a CMD command from it without exiting the Linux shell. Specifically, I want to do: wmic diskdrive get Model,Manufacturer,Size,DeviceID,...
Hashim Aziz's user avatar
0 votes
1 answer
225 views

How to escape a Bash function

I have the following function in my .bashrc file on WSL2: cd() { builtin cd "$@" && ls } I've used this on Cygwin without issue for years, and it works just as well on WSL2, except for ...
Hashim Aziz's user avatar
1 vote
0 answers
1k views

view binary contents of .bin file [closed]

I created a program in C++ that simulates a simple files system creating a 20 sector 64KB block memory allocation but I'm having trouble verifying contents after manipulation. Friend was using xxb -b "...
Appalling_Hero's user avatar
1 vote
0 answers
2k views

Windows 10 - GIT issues with cloning/pulling/pushing

I've got an strange issue. Since I updated my GIT on my Windows 10 machine, I get the error below. I use GIT for Windows with Bash. If I run GIT Bash with administrator rights then everything works ...
Jordy's user avatar
  • 11
0 votes
1 answer
458 views

Can I use bash commands on Windows 10 for example by using VBA macros?

Is there possibility to use Linux command line tools in Windows 10? Namely, I mostly work on Ubuntu with bash and I have done some useful script to compute things on CSV-files, for example by awk. And ...
guest's user avatar
  • 3
0 votes
1 answer
671 views

ssh-add prompting for PEM pass phrase for unknown reason

So some background: I have a collection of systems I use to access a server, which authenticate with a fingerprint key over ssh. On my other systems (android, windows 10, centos 7) I have no issues ...
user2005078's user avatar
2 votes
2 answers
529 views

Windows equivalent of $ in unix commands

I am following a documentation and executing some commands in Windows 10 command prompt. I have executed the first two commands using setx, since setx is the Windows' equivalent for export and when I ...
chink's user avatar
  • 121
16 votes
4 answers
104k views

Equivalent of export command in Windows

I am following a documentation and executing some commands in Windows 10 command prompt: export OPENAI_LOG_FORMAT='stdout,log,csv,tensorboard' export OPENAI_LOGDIR=path/to/tensorboard/data ...
singh adi's user avatar
  • 171
1 vote
2 answers
7k views

CMD and GIT Bash Extremely Slow

My computer info: Microsoft Windows 10 Home Single 10.0.18362 N/A compilação 18362 Multiprocessor Free GIT Version: 2.23.0.windows.1 When I open CMD, it open after 7, 8 seconds. I when I type git ...
Diego Souza's user avatar
0 votes
1 answer
3k views

On Git Bash, I get an error `cat: /dev/fd/63: No such file or directory` whenever I run the cd command

I've been trying to find out by this problem is happening, I'm using Windows 10 and this error occurs on Git Bash. Whenever I run the cd command to change the directory, I get the following error: ...
Joe Pena's user avatar
0 votes
1 answer
1k views

Use conda and git from same terminal (W10)

Windows 10 beginner here - currently using: Anaconda Prompt terminal to use conda and manage python environments. git bash terminal to use git and manage code. I want to use both conda and git in ...
DannyDannyDanny's user avatar
1 vote
1 answer
447 views

my virtual environment cannot be found

I'm on a PC windows 10 and always open git bash, then source activate my-env and open a jupyter notebook; somehow my-env broke and I get this error: "C:\bld\conda_1565126647711_h_env/etc/profile.d/...
Matan's user avatar
  • 23
1 vote
2 answers
2k views

Git Error: bash: command substitution: line 1: syntax error near unexpected token `)'

When I open my GitBash (on Windows 10) I am getting the below error: bash: command substitution: line 1: syntax error near unexpected token `)' bash: command substitution: line 1: `date "+%D %X")' ...
Rajesh Boga's user avatar
0 votes
1 answer
48 views

How to get color on ubuntu on windows 10

When I click the icon or run ubuntu from the command prompt there's no color in the prompt. But if I run bash in the ubuntu program there's color. How do I get color automatically on program startup?
theEpsilon's user avatar
2 votes
2 answers
14k views

How to run a bash script with task scheduler (Windows 10 V1903)

i want to automatically sync the folder on my windows pc to my external harddrive connected to a raspberrypi. My script works and just uses rsync to copy 2 folders over. I want to automate it via ...
Niklas G.'s user avatar

1
2 3 4 5