"So, I've got an account on Gridley. Now what?"

Logging In

You can log in to Gridley by using an SSH client: a program which connects to a remote computer, lets you execute commands, and see the results. If you're using Linux or Mac OS X, you already have an SSH client ready to use. Just open a terminal, and type:

ssh <username>@gridley.res.carleton.edu

Where <username> is the name of your account, like "johnd".

If you're on Windows, you'll need to download an SSH client. We recommend PuTTY. Just enter your username at the prompt, and connect to host gridley.res.carleton.edu.

Exploring Your Home Directory

After logging in, you'll be looking at a line like this:

kingsbuk@gridley:~$

That's called the prompt--it signifies the shell is waiting for a command. Commands are usually programs. You run them by typing their name, and then hitting enter. When the program exits, you'll be returned to the shell.

kingsbuk@gridley:~$ ls games lib public_html shared stalkernet users.txt gridley Mail screwdriver src users.rb kingsbuk@gridley:~$

The ls command listed the contents of the current directory. Often, commands accept arguments: additional instructions that modify their behavior. Arguments are separated by spaces, and follow the command name:

kingsbuk@gridley:~$ ls -l total 52 -rw------- 1 kingsbuk users 7 2006-05-18 14:40 games drwx------ 2 kingsbuk users 4096 2006-11-08 15:47 gridley drwxr-xr-x 3 kingsbuk users 4096 2007-08-14 14:23 lib drwx------ 2 kingsbuk users 4096 2006-03-20 17:39 Mail drwxr-xr-x 5 kingsbuk users 4096 2007-07-04 15:43 public_html drwx------ 15 kingsbuk www-data 4096 2006-10-04 15:53 screwdriver drwxr-xr-x 2 kingsbuk users 4096 2007-03-30 15:17 shared drwx------ 3 kingsbuk users 4096 2006-10-04 11:14 src drwx------ 2 kingsbuk users 4096 2006-10-06 12:46 stalkernet -rwx------ 1 kingsbuk users 1514 2006-11-08 17:13 users.rb -rw------- 1 kingsbuk users 10214 2006-11-08 18:45 users.txt

The dash (-) in front of l indicated that argument is an option: a flag that changes how ls works. -l tells ls to show long descriptions of the files it lists. Other times, commands accept filenames to work with:

nano hello.txt

Nano is a text editor: it lets you write simple documents and make changes to files. In nano, I can write some text, and save the file to hello.txt by holding the Control key and pressing "x". Nano asks if I want to write the file, and I confirm by pressing "y". I then hit enter to accept the output filename of "hello.txt". There are many other text editors available, but the two most popular are Vim and Emacs.

You can rename a file with mv (move).

mv hello.txt new_file_name.txt

You can delete files using rm (remove).

rm new_file_name.txt

Just like Windows and Mac OS X, the Linux filesystem is organized into heirarchical directories. When you first log in, you land in your home directory, sometimes represented by a tilde (~). If you want to see your current directory, use pwd (print working directory).

kingsbuk@gridley:~$ pwd /home/kingsbuk

You can create and remove directories by using mkdir and rmdir, respectively. To change directories, use the cd command.

kingsbuk@gridley:~$ mkdir videos kingsbuk@gridley:~$ cd videos kingsbuk@gridley:~/videos$ cd .. kingsbuk@gridley:~$ rmdir videos

There are two special directories: ., and ... The . directory always refers to the current directory. The .. directory refers to the parent directory: we used it to go back up from videos/ in the above example.

If you want to learn more about any command, man (manual) will come in handy. Simply type:

man <command>

... To read the documentation on <command>. Use "q" to quit when you're done reading.

Finally, you can log out of Gridley by using the logout command. Your shell session will terminate, and SSH will disconnect from the remote host.

kingsbuk@gridley:~$ logout Connection to gridley closed. aphyr@waterhouse:~$

Notice how my hostname changed from gridley to waterhouse, my desktop computer.

Transferring Files

You can use SCP or SFTP to transfer files to and from Gridley. Both are built on top of the SSH protocol, so your files are encrypted across the network. Just use the same username, password, and host as you do for SSH.

On Windows, you'll need to download an SCP client. We recommend WinSCP.

Under Mac OS X or Linux, just use the scp command. Open a terminal and type:

scp my_local_file kingsbuk@gridley.res.carleton.edu:my_remote_file

Of course, you'll use your own username and file names as appropriate. You can also copy files from Gridley back to your local computer:

scp kingsbuk@gridley.res.carleton.edu:my_remote_file my_local_file