UNIX* part 2 for Astronomy 695


  1. UNIX at home.

    There are lots of choices for using UNIX or at least some traditionally UNIX software at home or on a personal laptop.

    1. Install Linux. Lots of departmental experience with dual booting Windows and Linux, esp. Fedora and Gentoo. Ask around, lots of people can help.

    2. PuTTY

      If you must use Windows, PuTTY is a free ssh client. It also has an scp program and an sftp program for secure copying and ftping. It does not need to be installed. Just download and run the executable. This is extremely highly recommended if you connect to other computers remotely from a Windows machine.

    3. For Windows, check out Cygwin for GNU tools and X-Windows.

    4. For Mac OS X (I know it is based on BSD, a UNIX, but it doesn't come with all of the useful standard UNIX stuff) there is Fink and Darwin ports (Darwin Ports has recently changed its name to MacPorts and is moving to a new website). X11 and XCode are on the install CD and are very useful, but you must install them yourself (although they should be a default part of the OS, they aren't).

      I have a seperate page with a collection of hints and things I need to do to get UNIX programs on OS X. If you use an Apple for astronomy, you should check this (or one of the many other pages like it) out.

  2. Misc. UNIX commands

    Here are some random UNIX commands beyond the basic file manipulation commands that you are probably used to.

    top: Top is a pretty simple command which just shows you what programs are active, how much cpu time and memory they are using, how long they have been running and things like that. This can be useful if a computer is running slower than expected (or in other situations).

    less: Less is a pager program. That is it shows you a file one page (actually one screen) at a time. cat is fine to show a file that only takes up one screen or so, but if you need to see a longer file or need to move up and down in a file, less is what you need. Less is a replacement for the older command "more" which does the same thing only you can only move up in a file with it.

    who: This is very simple and shows who is logged on to a machine.

    ps: Sometimes you need to stop something that is running. You can do this with the kill command, but first you need the PID (a unique identifier for everything that is running). You can see everything that is running with your username with the command: ps aux | grep username. The first number is the PID. Then you can type kill -9 PID to kill it.

    du Disk Usage. This command shows you how much disk space you are using. du -sh shows a summary (s) which means it adds up all the subdirectories and puts it in human readable numbers (h).

  3. Astromake

    Astromake (by Peter Teuben) is a tool to load some software on your machine that are not installed by default. This includes PGPlot, a more recent version of Firefox, the Intel Compilers, and several others. This is for GNU/Linux only and only for department machines running Mandrake 10.

    To use, in your .tcshrc (bash users are on your own), include the line:
    source /astromake/astromake_start
    Remember, unless you log out and then back in, you must type source .tcshrc for changes to count. Then, to see what is available, type:
    astroload -v
    To actually load one of the programs type (or include in your .tcshrc file) astroload followed by the name of the program you want.

  4. OpenOffice

    OpenOffice is installed on the department computers. It is a free replacement for Microsoft Office. It can read and write Word, Excel, and Powerpoint files. At a command prompt, just type soffice to start it. In most places, the command is ooffice2, but we have it a little different.

  5. Twiki

    The department has a Twiki set up. You can only access this locally from the astronomy department network. This is basically a collection of webpages that may be edited by anyone in the department that provide a good place to put information that you feel may be useful to others (or to look for info like that yourself).

  6. Basic scripting.

    We can break scripting up into two types: shell scripting and stand alone scripting languages (Perl, Python, etc.). Many people in the department use C Shell scripting, although bash is the more common default shell on most computers these days (both Linux and OS X). C shell scripting has a C like syntax and relies primarily on the use of regular shell commands. Perl and python will be covered by other people at a later date.

    Shell scripting is just for very small jobs and for some configuration files. Some hints on shell scripting using tcsh and csh can be found here.

  7. Plotting:

    Several of the commonly used programs in the department are IDL, sm, PGPlot, and gnuplot.

    1. IDL

      This has far more features than any of the other plotting software listed here and can read and write tons of formats. This also makes it the hardest to use for quick little plots. It is big and expensive. If you use it, by far, the single best site about it is Coyote's Guide to IDL Programming. Don't bother with the printed manuals as they are hopelessly out of date (but the online ones which you get to by typing ? in IDL are okay).

    2. sm (Super Mongo)

      This is popular in the department, so there are lots of people to talk to about it. Not free.

    3. pgplot

      This is old school Fortran plotting. Great if you want control over every aspect of your plots and don't care about things like ease of use. If you actually want to use it, you probably want PGPerl. PGplot is used as the backend for programs like WIP, but some people (like me) use it with PGPerl for some of their plotting.

    4. Octave

      Octave is a free, partly Matlab compatible package which can provides an alternative (and somewhat more powerful) way to plot with gnuplot.

    5. gnuplot

      Gnuplot is simple, easy to script, free, but somewhat limited plotting package. Good for quick plotting. It is one of the best packages for 3d surface plotting.
      Go here for do a few examples with gnuplot.

Back to John C. Vernaleo's home page