It is alreadey on your computer. The Mac OS is running on a unix kernel. Open your Terminal (Applications > Utilities) and enter the following command:
you will see the new file on your desktop: first_test.txt
But there are also some binary applications of emacs and vim, which you may install.