I installed Emacs using sudo apt-get install emacs. The problem is that when I launch Emacs from the command line (e.g. emacs main.c) it opens Emacs with a GUI. I prefer the command line version which runs in the terminal emulator.

How can I install (or change some default) so that Emacs will open in the command line instead of a GUI?