The Lanucher is the vertical stack of application icons at the left end of the window. Clicking on an icon starts the corresponding application. To remove unnecessary applications from the Lanucher, right-click on the icons and choose Unlock from Launcher. Unix users normally start their application from a terminal window, so you probably want to have few icons in the Launcher.
You will need a terminal window to issue Unix commands. A
recommended terminal applications is gnome-terminal
.
Click on the uppermost icon in the Launcher, called Dash Home. Install
the Gnome terminal application by writing its name in the
Application text field. Then right-clicking on the corresponding new
icon in the Launcher and choose Lock to Launcher. Now you have an icon
from the Gnome terminal.
You can create tabs in the Gone terminal by clicking on that window and type Ctrl-shift-t for each tab you want.
Programmers frequently need curly braces and brackets. An American/English keyboard has these key in convenient places to the right on the keyboard. If your keyboard is not American/English, you can easily add a vritual American/English keybord. Click on the System Settings icon in the Lanucher, then Keyboard Layout, then Options..., then Key(s) to change layout, choose Right Ctrl + Right Shift. In the Keyboard Layout window, click on English (US) keyboard, then on the + button, find an the keyboard that corresponds to your physical keyboard (e.g., Norwegian (Macintosh, eliminate dead keys). Thereafter, you can switch between an English/American keyboard and the physical keyboard using Ctrl (on the left) and the right shift key. The keyboard in action can be viewed to the right in the panel at the top of the Ubuntu window.
The Control key is heavily used in Unix systems, and many prefer to have the Control key on the Caps Lock key. You can do this in the host system. Alternatively, you can set this in Ubuntu: click on the System Settings icon in the Launcher, click Keyboard Layout, then Options..., click Ctrl key position, click Caps Lock as Ctrl.
gconf-editor
,
choose apps, gnome-terminal, keybindings, next_tab,
right click and choose Edit key.... Fill in <Control>2
.
Choose prev_tab, right click, choose Edit key... and fill in
<Control>1
.
Install an excellent text editor, either emacs
or vim
(gedit
comes
with standard Ubuntu):
Terminal> apt-get install emacs
Terminal> apt-get install vim
Ubuntu comes with the Firefox web browser, but occasionally it does not launch correctly. An alternative is Gnome's Epiphany browser:
Terminal> apt-get install epiphany-browser
If you prefer the Chrome browser, launch
firefox
or epiphany-browser
, download Chrome as a .deb
file
(downloaded files go by default to the Downloads
directory).
Then run
Terminal> cd Downloads
Terminal> sudo apt-get install libgconf2-4 libnss3-1d
Terminal> sudo dpkg -i google-chrome-stable_current_amd64.deb
Some installation scripts (actually used to build Vagrant virtual machines) can be used to conveniently install basic packages for a scientific computing environment in a Linux machine:
For example,
Terminal> bash install_rich.sh
Here is a brief explanation of some of the most important packages in a Linux installation.
command | description |
mercurial | version control system |
git | version control system |
subversion | version control system |
bzr | version control system |
imagemagick | collection of tools for image files |
konsole | alternative to gnome-terminal |
g++ | GNU C++ compiler |
gfortran | GNU Fortran compiler |
auto* | tools for installing software |
wdiff | useful diff program for plain text |
kdiff3 | diff program for plain text |
meld | diff program for plain text |
latexdiff | diff program for latex files |
diffpdf | diff program for PDF files |
antiword | fast conversion of MS Word files to plain text |
vlc | audio and video player |
mencoder | tool for making movie files |
texlive-* | tools for TeX and LaTeX |
latex-* | tools for LaTeX |
libreoffice | OpenOffice tools |
a2ps | convert plain text to PostScript for printing |
pandoc | convert between many file formats |
gv | Ghostview PDF and PostScript viewer |
pdftk | tools for manipulating PDF files |
pdfjam | tools for manipulating PDF files |
gconf-editor | configure settings for Gnome applications |
ispell | spell checker |
command | description |
mkdir | make directory (folder) |
cd | change directory (folder) |
emacs | start an editor for writing programs |
ls | list files (in the current folder) |
ls -l | list files with size, date and owner info |
rm | remove file |
rm -r | remove folder |
mv | move (rename) file or folder |
cp | copy file |
cp -r | copy folder |
ls > res | store output of a program (here ls) in a file (here res) |
less res | look quickly at a file (here res), press q to quit |
ssh -X name@machine | log in on another "machine" as "name" |
Unix commands are written in a terminal window, also called console window, xterm, rxvt, konsole, or shell.
Below is a sample session illustrating all the commands above. We
mydir
myprog.py
myprog.py
to myprog.py-copy
myprog.py
to prog1.py
myprog.py-orig
mydir
folder to the new name trash
trash
foldernewer.ifi.uio.no
, under the name smartie
Unix> mkdir mydir
Unix> cd mydir
Unix> emacs myprog.py &
Unix> cp myprog.py myprog.py-orig
Unix> mv myprog.py prog1.py
Unix> ls
myprog.py myprog.py-orig
Unix> rm myprog.py-orig
Unix> ls
prog1.py
Unix> cd .. # .. is the quick name of the parent folder
Unix> mv mydir trash
Unix> ls > out
Unix> less out # press q to quit less
4 -rw-r--r-- 1 hpl hpl 6 2008-08-21 07:33 trash
out (END)
Unix> rm -r trash # need the -r to remove a folder
Unix> ssh -X smartie@newer.ifi.uio.no
password:
Everything after #
is a comment in Unix. Note that cd ..
is a quick
way of moving one folder up in the folder hierarchy.
Here are some more Unix goodies:
*
) can be used as a symbol for "any sequence
of characters" in filenames. For example, if you want to list all
your Python programs in a folder, you can write ls *.py
.
With the asterisk you can quickly specify a set of files.tar
command is used to pack and unpack file collections (like zip
or WinZip
on Windows). Suppose you want to pack together all your
Python programs in one compressed file called myprograms.tar.gz
.
Packing and unpacking is done by
Unix> tar cvzf myprograms.tar.gz *.py # pack
Unix> tar xvzf myprograms.tar.gz # unpack