Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cygwin zsh first launch : command not found

Tags:

zsh

cygwin

I just installed cygwin and zsh from the cygwin installer.

I launch C:\cygwin\bin\zsh.exe from the file explorer.

When zsh is launch for the first time, a small configutation is prompted.

I choose the minimal config by choosing : "Exit, creating the file ~/.zshrc containing just a comment. That will prevent this function being run again."

Now trying to use zsh, but I always have the "command not found" error

$ ls
zsh: command not found: ls

I don't understand why zsh can't do anything directly after the first launch. How configure zsh to use all the cygwin bin commands located in the same folder C:\cygwin\bin ?

like image 735
Jerome Avatar asked Jul 05 '12 07:07

Jerome


1 Answers

You need to invoke zsh as a login shell, by passing the --login or -l option. This tells it to source /etc/zprofile, which is where the search PATH is configured. You can do that by creating an Explorer shortcut to zsh.exe and adding the option to the target field.

like image 187
ak2 Avatar answered Nov 16 '22 20:11

ak2