Linux Guide
Linux Guide
Environment variables
• Set using export VAR=value
• HOME: home directory
• PATH: where programs will be searched in
• HOSTNAME: your computer name
• Check using env command
Sami Paavilainen Linux system at TUT physics department
Basic syntax
• ssh [email protected]
• scp file [email protected]:destdir
• scp [email protected]:sourcedir/sourcefile file
Making things easier:
$HOME/.ssh/config
Host murska
HostName murska.csc.fi
User paavi
1 ssh-keygen -t dsa
• Creates files id dsa.pub and id dsa in .ssh directory
• Give a strong password you can easily remember (ssh password)
2 Copy public key into remote computer
• Login on remote computer with ssh
• Create $HOME/.ssh directory (if not exist already)
• Edit authorized keys file (remote)
• Copy-paste contents of your local id dsa.pub into remote authorized keys file
• check that there is only single long line
• Log out
$HOME/.xsession
exec ssh-agent /usr/bin/startkde
6 Open konsole and write ssh-add (asks for your ssh password)
7 Now you can login on remote computer without giving password
8 If you login by ssh -A you will also get back without giving password
• Handy with scp
Matlab
• not on every computer, ask if needed
Octave
• free matlab clone, installed on every computer
Compiling programs
• Intel software
• ifort: fortran compiler
• icc: c++ compiler
• use -xP option on local computers
• MKL libraries (on some computers)
• Gnu programs
• gcc: c++ compiler
• gfortran: fortran compiler
• use -O2 -march=i686 on local computers