2.5. Environment Variables. Comtrol DeviceMaster Software Development Kit
Reklaam
Reklaam
Chapter 2. Setting Up Cygwin
Under Windows NT, if you want to create /etc/passwd and /etc/group (i.e. so that
whoami works and ls -l replaces the UID with a name) just do this:
/$ cd /etc
/etc$ mkpasswd -l > /etc/passwd
/etc$ mkgroup -l > /etc/group
Future changes to your NT registry will NOT be reflected in /etc/passwd or
/etc/group after this so you may want to regenerate these files periodically. Under
Windows 9x, you can create and edit these files with a text editor.
The who command requires the /var/run/utmp to exist. Create it if you wish. The system also logs information in /var/log/wtmp , if it exists.
The /usr directory is not used by the Cygwin system but it is a standard place to install optional packages.
You may also want to mount directories such as /a and /d to refer to your local and network drives.
You do not need to create /dev in order to set up mounts for devices such as
/dev/null as these are already automatically simulated inside the Cygwin library.
2.5. Environment Variables
Before starting bash, you must set some environment variables, some of which can also be set or modified inside bash. Cygnus provides you with a .bat file where the most important ones are set before bash in launched. This is the safest way to launch bash initially. The .bat file is installed by default in \cygnus\cygwin-b20/cygnus.bat
and pointed to in the Start Menu. You can edit it to your liking.
The CYGWIN variable is used to configure many global settings for the Cygwin runtime system. Initially you can leave CYGWIN unset or set it to tty (e.g. to support job control with ^Z etc...) using a syntax like this in the DOS shell, before launching bash.
21
Laadi alla
Reklaam