

Question: Can you get gcc to compile hello.c as a binary called hw instead of hello? Makefiles Question: What happens if you don't compile with the -o hello flag? (try it and see!) helloĪt this point the immortal words Hello world! should appear on your terminal. Furthermore, this file is executable, and can be run via: #. If all has gone according to plan you should now have a file called hello.

Rmdir remove a directory (it must be empty first!) Mv move a file from "src" to "dest" essentially "rename a file" change to the parent of the current directoryĬat "concatenate" a file essentially "print this file to the screen" Ls list the files in the current working directoryĬd "change directory" to the given directory nameĬd. Here is a quick reference to common terminal commands on Unix-based systems (e.g., Ubuntu/Mint Linux or Mac OS X): pwd "print working directory " essentially "where am I?" Question: What is the output? If you run the command again, does the output change? Try this now:ĭO THIS: Execute the following line in your terminal window: # date

Using the terminal, you will execute commands by typing them and pressing ENTER, and the system will respond with any output in the same window. The terminal functions as an intermediary between you and the computer system, allowing you to have a "conversation" of sorts with the programs on the system. DO THIS IN THE MAC LAB (ISAT 248): Press COMMAND-SPACE, type in " terminal" and press ENTER.
