Reputation: 67
This is a probably a dumb question. I was previously a mac user that uses terminal for everything, now I'm new to windows and tried to use cygwin to get the terminal functionalities. But I can't seem to figure out what's wrong with it:
$ pwd
/home/rachel
$ ls
[no output]
$ cd Desktop
-bash: cd: Desktop: No such file or directory
What's wrong with my cygwin and how could I change directories with it? (cd Desktop
works on commandline powershell so the path should be fine). Or is there better linux environment simulator for windows?
Thanks in advance!
Upvotes: 1
Views: 190
Reputation: 9855
Cygwin doesn't use your Windows home directory as /home/rachel
but creates its own directory structure somewhere and translates between UNIX style Cygwin paths and Windows paths. /home/rachel
may be correspond to C:\cygwin\home\rachel
or similar.
You can use
cygpath -w $(pwd)
to see the translation of the current directory.
To get to your Windows drive C:\
you can use
cd /cygdrive/c
If your Windows user name is rachel
, your Windows Desktop is probably
/cygdrive/c/Users/rachel/Desktop
If ls -a "$HOME"
doesn't show a .bashrc
, then this file does not exist yet. Simply create it if you want to use it.
An alternative to Cygwin is MSYS2.
https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin/
Upvotes: 1