Unix Environment
After you install PuTTY or some other SSH utility on your computer, you can
then establish a secure connection session to the deepblue server at Camosun
from home. In PuTTY make sure you enter the host name as
deepblue.cs.camosun.bc.ca and the protocol of SSH (not Telnet). You will
be prompted for your CST account login ID and its password.
This is a command line environment not a Windows session. The mouse
cursor will not work as you might expect under File Explorer. Case
matters in Unix even for commands. So the command CD will not work, it
has to be cd.
To accomplish any task in this session you must enter UNIX commands when
prompted. The prompt looks like this:
deepblue$ or just $
Some Unix commands you will need to know are:
cd |
Changes the current working directory (CWD). Example:
cd work makes work the CWD. |
ls |
Lists the files and folders in the CWD. If used with
the -F option the result with show folders with a "/" and
executable files
with a "*". |
logout |
Disconnects the session |
chmod |
Changes the protection attributes of a file or folder.
Common usages are: chmod 755 work makes the folder work
readable to everyone - especially useful if you want a web server to able
to read your folder, chmod 644 myfile makes the file readable to
everyone - also necessary if a web server needs to read your file. |
rm |
Erases a file or folder. |
Here is a sample Unix session:
deepblue$ cd public_html
deepblue$ ls -F
comp140/ comp112/ html/ index.htm working.htm practice.htm
myprog.exe*
deepblue$ chmod 755 html
deepblue$ chmod 644 working.htm
deepblue$ cd html
deepblue$ ls -F
main.htm main_test.htm
deepblue$ rm main_test.htm
deepblue$ cd ..
deepblue$ ls
comp140 comp112 html index.htm
working.htm practice.htm
deepblue$ logout
Goodbye!
The first cd command changes the CWD to the public_html directory.
The ls -F command displays the contents of the public_html directory with
folders having a "/" and executable files with a "*".
The chmod 755 html command makes the html folder world-readable to a web
server. By default a directory you make will not have this access
provided.
The chmod 644 working.htm command makes that file world-readable to a
web-server. By default any file you copy into public_html will not have
this access provided.
The cd html command makes the html folder the CWD.
The ls -F shows the contents of the CWD.
The rm command erases the file main_test.htm. Use rm with extreme caution.
The cd .. command makes the parent directory the CWD.
Without the "-F" option the ls command just shows the files and folder
names.
Logout disconnects the session.
|