Finding your way in Sun Solaris
Window manipulation
- Should be less friendly than Windows or Mac but I hope you can
manage
Terminal (Unix) applications
- you will need to run a number of applications in the Terminal
(similar to Windows Command Prompt). Find the Terminal in Utilities
- You will need more than one terminal window. To open a new terminal
window chose File/New Shell when Terminal is active
- The terminal, (and emacs below) have
file
name self completion. Just type the first 1-2 letters of a file
name and press Tab, the name will be completed automatically.
- if you get lost in the file system directories, type
cd ~ (cd space tilda) to come
back to your home
directory
- don't type the same command many times! You can press arrow-up or
arrow-down to navigate through the previous commands that you gave.
- some unix file-related commands
- cd dir to change directory
- Tab while writing a
file/directory name auto-completes it so you don't have to type it all
- ls to list a directory
(dir in Windows)
- pwd prints the working
directory
- mkdir dir to make directories
- rm filename to delete a file (del in
Windows)
- rmdir dirname to remove an empty
directory
- more filename to view the
contents of a text file (but better open it in emacs, see below)
Text editors
- up to now the best text
editor for programming i could find on the Macs (or Windows) is
emacs. Type "emacs" in the terminal
Emacs is not very friendly with beginers but it's worth learning
to use it. If you get to like it, there is
emacs
for Windows and for
many other platforms.
- ctrl-x ctrl-f to open a
file (or create a new file), ctrl-x
ctrl-s to save
it, ctrl-x ctrl-w to "save
as", ctrl-x ctrl-c to exit.
- you can open more files (called buffers in emacs). ctrl-x b to switch to another
buffer, ctrl-x k to close
(kill) a buffer. ctrl-x ctrl-b to
see all buffers, ctrl-x 1 to
see just one buffer, ctrl-x 2
to see 2 buffers, etc. ctrl-x o to
switch to the next visible buffer
- Tab to align a program
line nicely (in Java files)
- ctrl-a to go to the
beginning of the line, ctrl-e to
go to the end of the line, ctrl-v one
page down, esc v one page up
- ctrl-d to delete the
character to the right (Delete key on windows), ctrl-h to delete to the left
(Backspace works as well)
- ctrl-k to cut lines, ctrl-y to paste them
- ctrl-s to search text.
The search is incremental, you will like it.
- whenever you get lost
in emacs commands, just press Esc 3
or more
times until it says "Quit". That means that you gave up whatever
you
wanted to do when you went wrong and now you can start new commands.
- find
out more about emacs. Here is the official site
- a simpler text editor is
pico,
it has on-screen help. Just type pico. You can only edit one file with
pico so you will have to open more Terminal windows (Meta-n)
Logging in from home
You can use
KTelnet
or Putty to log in from home on any of the Konsthallen or
Grå machines (for
example
konst01.nada.kth.se,
grey05.nada.kth.se).
Login on any machine, no matter on which you worked in the lab. Then
you
will be able to use the machine as if you opened a terminal. It
is
good practice to run the command
kauth
just after you logged in.
- I am having problems using Backspace in emacs over KTelnet.
Instead of pressing backspace, move to the left with the <- arrow
and then press ctrl-d to
delete to the right instead of deleting to the left.