On Ubuntu installs, including the department machines, the default editor is nano instead of vi. This is the editor that will normally get used when you run svn commit. If you'd rather have vi, there are a couple options for going about this:
# editor-cmd = editor (vi, emacs, notepad, etc.)to
editor-cmd = vi"#" is usually the comment marker (like "//" in C99, C++, and Java) in UNIX shells and config files. This will change the editor for subversion only.
If you want to use vi as your default editor for any normal UNIX/GNU program that needs an editor, you can set the EDITOR environment variable.
On tcsh (which is the shell you get when you login on the department
machines), this can be accomplished by using the shell builtin command
setenv EDITOR vi
before running svn. The environment variables get reset each time
you login; you can make this change permanent by adding the line:
setenv EDITOR vi
to your ~/.login file. (If ~/.login doesn't exist, you can create one containing just the setenv command.)
For the bash shell, which is the default shell of most Linux distributions including a fresh Ubuntu install, the command is
export EDITOR=vi
This can be added to your ~/.bash_profile file. If ~/.bash_profile does not exist, you can create one with just the export line.
If you have installed Ubuntu on your own home machine, and you'd like change the system default editor for all users, you can change this with the command:
sudo update-alternatives --config editor
to select vim.
More generally on just about any UNIX/Linux distribution for which you are the administrator, you can change the system default editor by putting:
setenv EDITOR vi
in your /etc/csh.login (or /etc/.login, on Solaris) file and putting the lines:
EDITOR=vi export EDITOR
in your /etc/profile file.
This class will use the standard UNIX/Linux/GNU utilities and C development tools as well as subversion as they are found on the department machines running Ubuntu. The supported means for you to work is by using the machines in our computer lab, but it is also possible to work from other locations by either using ssh or by installing Linux on your own computer:
Use your own Linux installation. Linux is free and quite easy to install on your own computer. I generally recommend the Ubuntu distribution for Linux for ease of use. For an "enhanced learning experience," you might also consider the Debian or Gentoo distributions. For Windows users, the least intrusive way to setup Ubuntu is to use: WUBI. Other options include a standard dual-boot install, dedicating a computer to Ubuntu, or setting up virtualization through KVM/QEMU, Xen, VirtualBox, Parallels, or VMWare (the first three of these virtualization systems are free, open source software) so you can run Windows and Linux programs simultaneously. For more information about installing, administering, and using Ubuntu, you may wish to consult the Ubuntu Pocket Guide and Reference.
If you do a base Ubuntu install, you will want to make sure that the packages build-essential (C compiler tools), subverison and ssh get installed. This can be accomplished with the command:
sudo apt-get install build-essential subversion ssh
Some additional tools for checking/debugging your C programs include valgrind, splint, and ddd:
sudo apt-get install valgrind splint ddd