FF505 - Computational Science - MATLAB Section

Introduction

This short note aims at introducing you to the computer system of the terminal room at IMADA, where the matlab sessions will take place.

IMADA Terminalrum

The computers at IMADA run a version of the Linux operating system called "Ubuntu" with "Unity" as the default desktop manager. It is operated similarly to other Linux distributions, to Mac OS X, and in many ways also to Windows. You find an introduction to the Linux system in the short tutorial linked after this one from the page that brought you here.

To set up your account for use in the IMADA terminal room, this is what you have to do.

  1. Your IMADA account is not the same as your SDU account. If you do not have an IMADA account yet then follow the link "Account" in the previous page. If you cannot find any account for you, then contact Marco as soon as possible.

    Log in a computer of the Terminal room with your new IMADA account.

  2. Change your password in the IMADA account. To do this, go to Applications -> Accessories -> Terminal: This starts a terminal prompt, where you can interact with Linux. Write yppasswd and follow the instructions to select a new password. Your password should have at least 8 characters and include lower-case letters, upper-case letters, and digits (XKCD comics). The change can take up to 5-10 minutes to be registered, although most commonly it takes immediate effect.
  3. Create a folder in your home directory called FF505:
    mkdir ~/FF505
    

    You can change into the folder by using cd FF505 from your home directory. If you are unsure whether you are in your home directory, just type pwd to find out where you are and cd to change to your home directory. It might be useful to create some subfolders for individual weeks, projects etc.

  4. Never forget to log out using the menu on the top right! Your data will remain saved in your IMADA home directory and will be there when you log in again. Do not switch off the computer!

Starting Matlab

All machines have Matlab R2014a installed. In a Linux/UNIX system, you start an application by opening a terminal and typing matlab &. In Unity you can also press ALD and the space bar together to get a search dialogue where to type "matlab".

Linux for beginners

You are now reccommended to go throguh the other tutorial about Matlab.

If you are done with that and you want to learn more about Linux, you can use this tutorial:

  • Tutorial One
  • Tutorial Two
  • Tutorial Four
  • Tutorial Five

Play around with the things you learn from the tutorial. To create a new empty file use the command 'touch <filnavn>'. A very important thing is to understand the permission system about your files and directories (see Tutorial 5). You can test whether you set the correct permissions by trying to access the files of each others. Your files are placed in the directory: /home/<brugernavn>/.

Bonustip: one can use chmod go-rwx <mappenavn> to set a directory and all its content to be accessible only by its owner.

It is your own respnsability that others cannot read your data. By default your data are established as readable by everyone. Therefore, check and change the permissions to your files.

Tips & tricks

  • Når du forlader din computer i terminalrummet, så husk at logge ud! Ellers vil du pludselig opdage at dit baggrundsbillede måske er blevet ændret, til noget der er mindre pænt.
  • Hvis du bare skal forlade computeren hurtigt, kan man nøjes med at låse skærmen: Ctrl + Alt + L
  • Tegnet ~ er en genvej til ens eget hjemmebibliotek. Dvs. kommandoen: cd ~ vil altid tage dig til din hjemmemappe.
  • Firefox (og nogle andre programmer) kan som udgangspunkt kun være startet på én maskine af gangen pr. bruger. Dvs. hvis Firefox startes på en maskine, og man forlader maskinen uden at logge ud, så vil man få en fejl hvis man logger ind på anden maskine og starter Firefox. Firefox vil fortælle dig at "din profil allerede er i brug". Det løses nemmest og mest korrekt ved at finde den oprindelige maskine Firefox er startet på, og så logge ud fra den. Hvis denne maskine ikke kan findes, kan problemet løses ved at slette filen ~/.mozilla/firefox/<profilmappe>/.parentlock. <profilmappe> er forskelligt fra bruger til bruger, men mappen hedder typisk et par tilfældige bogstaver/tal efterfulgt af .default. Filen .parentlock er skjult (filnavne der starter med et punktum er skjulte per definition i Linux - slå visning af skjulte filer til i din filbrowser for at se den).

.bashrc

Den skjulte fil .bashrc i din hjemmemappe kan bruges til at indstille strengere tilladelser til nye filer du opretter. Dette kan gøres ved at tilføje linjen umask 066 nederst i filen. Dette gør at filer som standard bliver oprettet med rettighederne: 600 (dvs. du kan selv læse og skrive, men gruppen og andre folk kan intet) (på denne side kan der læses mere om umask, og hvordan en umask sættes.)

Færdig? Top nice! Brug resten af tiden på at lege rundt i Linux eller fortsæt evt. med flere tutorials fra linket ovenfor.

Date: 2016-01-14T14:16+0100

Author: marco

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0