0

I have added certain aliases in .bashrc file, that point to the windows location of the start-server bat files of kafka and zookeeper. However when I run those in the gitbash its saying Command not found error

Example if I have below alias in .bashrc file and I run the command zoo in gitbash it gives above error

alias zoo="D:/Tools/kafka_2.13-2.8.0/bin/windows/kafka-server-start.bat" 
2
  • 2
    Bash doesn't run Windows batch files. Use a Windows command interpreter to run these. Commented Dec 6, 2021 at 8:00
  • 1
    Kafka doesn't run that well in windows, anyway. You might want to try WSL2 instead Commented Dec 6, 2021 at 15:05

2 Answers 2

1

Gitbash only reads .bash_profile not .bashrc, either place aliases in .bash_profile or place these line on the top of your .bash_profile:

if [ -f ~/.bashrc ] then . ~/.bashrc fi 

also see: Git for Windows doesn't execute my .bashrc file

Sign up to request clarification or add additional context in comments.

Comments

0

If you make modifications to you .bashrc file, make sure to source the file right after that at the command prompt and check your permission in order to do it. :

$ source .bashrc

Set any permission to 755 (chmod 755) at the command prompt as well if you are still having difficulties. Usually scourcing should do it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.