Observational Astronomy

Getting Started


Observational Astronomy is a website created by Jerrick Wee (’19) from Yale-NUS College as a guide to conduct scientific research in astronomy and astrophysics.

Getting Familiar with Terminal

Most of us work through our computer with the graphical user interfaces (GUI), which allows us an intuitive interaction with our computer. There is another way to work with a machine, and that is through what is called a command-line interface. There are several reasons why people would want to use the command-line interface over a GUI, and you can explore these reasons here. For us, Terminal is necessary to run and install software packages and files that we need for research in observational astronomy. It is also important for us to be familiar with the commands in Terminal as we will be using them in Python.

Access the Terminal

Either go to Applications → Utilities and clicking on Terminal, or just bring up Spotlight via Command + Spacebar and typing ‘Terminal’.

Once it’s opened, you’ll see a display with your directory on the left (e.g. “weejerrick”), and an input area on the right known as a prompt.

Basic Commands

Here are a few basic commands you should know when operating in Terminal. Right now, you’re in a directory, and you would want to know what is in this directory. To do so, command list with ‘ls’:

As you can see, it gives a list of the subfolders or files in that directory that you’re in. Say that I want to enter a directory, I can use the “change directory” command with “cd”:

If you want to create a file, you can use the ‘touch’ command:

To delete a file, use the remove command, ‘rm’. Warning: deleted files are deleted forever.

If I want to create a directory, I can use the ‘make directory’ command, ‘mkdir’:

That should cover most of the basic functions that we’ll need with Terminal. For a more exhaustive list of functions you could use on Terminal, check out this page.