PHY102 - Linux Help

The computers in 1240BPS run the Linux operating system. Linux is a form of the Unix operating system which runs on pc's and it is popular, because it works well and it is FREE. Unix is the most widely used operating system on workstations, whereas MS Windows is still the most widely used system on pc's.

Your account

Your account name and initial password will be given to you on a piece of paper at the start of the first laboratory session.

Some useful Linux commands

Run mathematica

To run mathematica type at the command line "Mathematica &". The ampersand "&" starts mathematica as a separate process and gives you your command line back. To run the example program, save a copy of it on your Desktop (using the Save command that you will find on the File menu of your browser). If you save it with the name Worksheet0.nb, then you can run it in Mathematica by entering the command
  Mathematica Worksheet0.nb Mathematica

Completing assignments

  Complete assignments by typing information into your Mathematica notebook on the screen.  Periodically save the notebook.
  Click ``save'' which is under ``file'' in mathematica toolbar. It will save the file to the current directory under the linux operating system (give it a better name that ``untitled''!!). To ensure that you have succeeded, use the "file manager", or return to your ``terminal'' window and type ``ls'', to make sure that it is there.  Saved notebooks can be reopened in Mathematica from the "file" menu.  An assignment is completed when you have completed all the questions on the worksheet, and have handed in a printed copy.

Print your worksheet

To print your file, Click ``print'' under ``file'' in the mathematica toolbar. Then choose ``file''. This will save your file as a postscript file (again give it a better name that ``untitled''). Then return to the terminal window and type ``ls'' to check that it is there. Now type ``lpr filename.ps'' and your file will be printed on the printer in BPS1240.

You can launch a window-based help system from the applications menu.

Another way to print a file:

you can use the unix command
lpr filename
or you can open the file in gedit and use that editor's print option.

Customize unix

You may find it convenient to append the lines
set history = 32
alias h 'history'
alias rm 'rm -i'
to the file .cshrc in your home directory. Then h displays the last 32 commands you entered, and rm asks for confirmation before deleting a file.

If you plan to stay in a technical field such as physics or engineering you will benefit from learning more about the unix operating system and a nice unix manual is available online.
 

Time to go home, just for today...

To end your session and log out:
1) first save everything that you don't want to lose
2) close all your applications.  Strictly speaking you don't have to do this, but you will find things you forgot to save this way and won't lose them!
3) log out: click on the "start" button, the icon on the bottom left of the screen. Holding down the mouse button, drag to "log out" and let go the button.