next up previous
Next: Read Files, Write Files, Up: unix_guide Previous: Getting Started

You are In

Summary of this section

When you login, KDE window manager will come up. It may take a few seconds. The organization of KDE is very similar to Windows. The first thing you need to click on is the big `K' icon at the bottom left corner. This is like the `Start' button on Windows. Click it and you will see lots things such as applications, settings and logout.

Now unlike Windows, Unix is all about command line. So sooner or later, you have to know how to do things at the command prompt. The sooner, the better. The first thing to do is to find the `xterm' icon from the bottom bar. It looks like a little terminal. Click it and you should see a window popping up with something like this:

HAL9000>

Now,


\fbox{
if this is your first login, you {\em must} change your password.
}


You can do that by typing

HAL9000> yppasswd
at the prompt. You will be asked to input your new password twice. Memorize your password. If you don't know, or you have forgotten your password, go to your system operator, beg for mercy, get a new temporary password, then change it to a new one.

Now that you are in, first let's see what you have. Type

HAL9000> ls
This results in something like
foo.txt        foo.tex        foo        foodir

You may think of ls as a shorthand for ``list'' though I have no idea if that was really the origin of the name. Unix command names tend to have peculiar origins, like grep2. Some are easy to memorize, for instance cp for ``copy", but some names may seem to have no connection whatsoever to their functions (what do you think awk does?). But that's life. You win some, you lose some.

So, you have two objects foo.txt, foo.tex that look like files and and things called foo and foodir. To find more about each object do

HAL9000> ls -l
If the very first letter of an entry is d, that means that entry is a directory. If you see x's in the first column, that means the object in principle can be run as a program.

To see the content of a subdir, type

HAL9000> ls foodir
If it is a subdir, then it will result in
oof.txt        oof.tex        oof        oofdir
If it is an ordinary file after all, it will just say
foodir

To see all the files including files that start with . (these are usually config files like .tcshrc),

HAL9000> ls -a

To find out more about ls, type

HAL9000> info ls
info is the command that retrieves information on the command you are interested in.

To read a file, type

HAL9000> less foo.txt
Other file readers include more and the primitive cat.

It is in general much better to organize your materials into subdirectories. To make a subdirectory,

HAL9000> mkdir new_dir_name
To change to a subdirectory, type
HAL9000> cd foodir
You can think of cd as an acronym for ``change directory". Going one ladder up in the directory structure (to the parent directory) is
HAL9000> cd ..
NOTE: The present directory in Unix is always represented by a dot. That is, if you do
HAL9000> cd .
it does nothing because you are changing directory to where you are now.

To go to the home directory (the one you get when you login), simply type

HAL9000> cd
To find out in which corner of your subdirectory maze you are currently stuck in, type
HAL9000> pwd
pwd stands for `print working directory'. This will result in something like
/homes/hal9000/dave
The paths before you user name indicate on which disk your home directory is located. But be warned that sometimes pwd produces inconsistent result when you are logging in from someone else's machine.

If you want to quit, type logout or exit. This will normally quit the x-term you are currently in. If you want to quit the session and get back to the login window, find a menu item under the `K' button that says logout.


next up previous
Next: Read Files, Write Files, Up: unix_guide Previous: Getting Started
Sangyong Jeon 2007-09-18