This document provides instructions for using basic commands in Cygwin without installing Cygwin, including how to navigate directories, use code editors like emacs and xemacs, compile and run C++ programs, and some common UNIX commands. Key steps are to cd to the project directory, use emacs or xemacs to write code, compile with g++, and run the executable. Common UNIX commands like ls, cp, rm, and man are also listed.
This document provides instructions for using basic commands in Cygwin without installing Cygwin, including how to navigate directories, use code editors like emacs and xemacs, compile and run C++ programs, and some common UNIX commands. Key steps are to cd to the project directory, use emacs or xemacs to write code, compile with g++, and run the executable. Common UNIX commands like ls, cp, rm, and man are also listed.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
This document provides instructions for using basic commands in Cygwin without installing Cygwin, including how to navigate directories, use code editors like emacs and xemacs, compile and run C++ programs, and some common UNIX commands. Key steps are to cd to the project directory, use emacs or xemacs to write code, compile with g++, and run the executable. Common UNIX commands like ls, cp, rm, and man are also listed.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Chester’s Cheat Sheet for Using Cygwin, but not installing it
cd C: (goes to C: cygwin directory)
cd CS1Projects (open the project folder) xemacs blank.cpp (code editor) emacs blank.cpp (code editor) “Type the code in, when finished ctrl-x ctrl-c, press y. Double-check for coding errors For exiting the cygwin editor “F10 f qy” For exiting emacs editor ls (for seeing all the files within) “compile it with g++” g++ -o blank –Wall blank.cpp (use an ls to see if a blank.cpp & a blank.exe exist) ./blank.exe (this runs the program) g++ -Wall –o exec_name blank1.cpp blank2.cpp blank3.cpp Type (exit) to exit the cygwin Useful UNIX Commands To list files in your current directory ls or ls-1 (“el es”)
To copy a file cp oldfile newfile
To delete (remove) a file rm filename
To change a filename mv oldfile newfile
To get information on how to use a command man command
To print a file lpr -Pprintername filename
To view a file one screen at a time less filename
To advance one screen, hit the spacebar
To sign off logout
To create a subdirectory mkdir directoryname
To change the current directory to a cd directoryname
subdirectory
To change the current directory to the parent cd ..
directory
To interrupt a running job Control C
Zip a directory zip –r files_name.zip hw1
Find out which version gcc –version or g++ --version
List the path directory pwd
Compile just a cpp file g++ -c blank.cpp
Compile all the .o files into an .exe g++ blank1.o blank2.o blank3.o -o hw#