how to go into the environment of "c". when using cygwin... please tell me the commands to go into the c environment...开发者_运维技巧.
If you want to cd to the C: drive then one way is:
$ cd /cygdrive/c
If you want to edit/compile/run/debug C programs, then it's:
$ emacs foo.c # edit
$ gcc -Wall foo.c -o foo # compile
$ ./foo # run
$ gdb ./foo # debug
Do you want to navigate to the C: drive when in the shell? If so, just do cd c:
Install cygwin from cygwin.org. Select development packages like gcc during the process. Open a cygwin shell and call gcc from the command line. Or whatever.
After reading the question, my first interpretation was that the question was about how to ensure that the C locale was set for the shell in Cygwin, rather than allowing the Windows locale to be inherited. Putting export LC_ALL=C
or export LC_ALL=C.utf8
into your ~/.bashrc
would force the C locale in all shell contexts. The command locale
can be used to see your current locale before and after changing LC_ALL
, which will help verify that the change is in effect. man bash
(or your shell of choice) will provide more information on what is affected by the various locale-related environment variables.
精彩评论