Skip to main content

2.1) Using emacs


You will now learn how to put words or numbers into a file. You do this by using an editor. Just as in MS Windows you would use notepad or MS Word to write a document (make a file), in Unix you do this with an editor and you will learn the emacs editor. This is not Unix but it is essential learning that goes hand in hand with learning Unix. I will teach you a very simple editor called emacs. Type the following in your terminal and hit the return key to ask Unix to do the action.
emacs newfile
Hit return to make the command happen. On the next page are links to pictures and videos of what you should see.
Note, there are a number of editors in Unix that you can use to make files. Some will be available on your system and some may not. You check, just try the command. The most basic editor is "gedit newfile". If you want to use this editor the refer to http://en.wikipedia.org/wiki/Gedit. Another well useds editor is "vi" or "vim". This editor is a bit more complicated but used by a lot of scientists. A good introduction to using it is given at http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html.
[tippy title="Hint for Windows Users"]
You make a file with writing in it in MS Windows using MS Word and a file with data in it usually in MS Excel (or you can enter the data into a MS Word document). In Unix you just make a file with either data and/or words in it using an editor. An Ms Word document is often described as a '.doc' file. Files made by Unix editors are in a format called ASCII.
[/tippy]