You will now be logged in. On the top left of the screen you will find a 'Red Hat' icon. This is equivalent to the Windows 'start' button. Clicking on this will open up a number of menus giving you access to various applications.
For example to start up the Firefox browser select Applications-Internet-Firefox. If you are prompted for a proxy username and password you can simply select cancel. This is only needed if you want to access web sites outside of PARNET.
At the top left of the desktop you will see an icon of a folder labeled 'Home Directory'. If you double click on this a file manager window will open up. This will be similar to Windows Explorer and you can use this to find files, and copy, move, rename and delete files. In this window you will also notice a folder labeled '..' clicking on this folder takes you up to the parent folder.
Commands are entered into terminal windows (like the MSDOS prompt window). Open a terminal window by double-clicking on the computer monitor icon on your desktop. Alternatively you can get a terminal window by selecting the 'Red Hat Applications' menu and then selecting 'System Tools'. When you open a terminal window you will be placed in your home directory. This is the directory in our system where you will keep your files.
The basic operations that you want to perform in any operating system are file copying, renaming and deleting, the ability to move between directories/folders, and the ability to list the contents of a directory/folder.
> lsDirectories will be displayed in blue and have a trailing '/' symbol (directory is the Unix term for a folder).
> ls -a lists all files (including hidden ones) > ls -l provides a long listing with extra file information
> cd directory_nameThis changes the current working directory (the one that you are working in) to the new one that you have specified.
To 'step up' to the parent directory type
> cd .. The '..' means parent directory (do a ls -l)If you do this you will be placed in the directory that holds all the directories of your colleagues. A ls command will list them all out. Use a cd your_login_name to move back into your own directory.
> pwdThis may be something like
/home/ug02/your_user_name- your home directory is a subdirectory of ug02, which is under the main home directory. You will also find that the title bar of each terminal window will display the current working directory.
> cp file_name copied_file_name
> mv file_name new_file_name
> rm file_name (there is no way back...)
> xv &Why do this?
If you do not type the '&' the terminal window will be 'stuck', waiting for you to quit xv, before it will display a prompt for the next command.
> man program_name > man ls - will tell you about the ls commandIf you don't know the name of a command you can try looking for manual entries via a keyword
> man -k keyword This will list all programs that man thinks might
be relevant to your keyword (often more than you want)
eg. try
> man -k print
>matlab & (I suggest you run it in background)a large window will pop up. This will contain 3 sub-windows; a command window, a command history window and a launch pad window.
The launch pad window allows you to browse and launch existing MATLAB programs by double clicking on them rather than typing their names into the command window. The command history window records all your commands, previous commands can be edited and reused by double clicking on them. However, previous commands are always accessible to you from the command window via the arrow keys or (Control-P).
I practice I prefer to close the command history and launch pad windows, and only use the command window.
Many programs 'understand' common emacs command for modifying text. For example, Firefox, the terminal window, and the MATLAB command window will respond to basic emacs commands.
For example to create and edit a file called script1.m you would type the following command in an terminal window
> emacs script1.m & ( run emacs in background)In the emacs window you can then type in a simple MATLAB script. To save your program select 'Save Buffer' under the 'Files' menu. (You can also save the file by typing Control-x-s, that is type x and s while holding the control key down)
For more information on how to use emacs you can select 'Emacs Tutorial' from the 'Help' menu. It will take you about 15 minutes to run through the tutorial.
When you type in a program, save it, and then try to run it in MATLAB you will inevitably have an error. You will get a message giving the line number in the file where the error occured. To fix the problem go to your emacs window and edit the file. There is a shorthand way to get to a desired line, type Esc g. At the bottom of the emacs window you will be prompted for the line to go to - go there and fix your error(s). Save the corrected file (Control-x-s). Move to the terminal window running MATLAB and try again...
Experiment, have fun...
Don't forget to log out