Presbyterian College > Academic Web Server > Support Info > Server Command Line


Using the Server's Command Line

The server web.presby.edu currently runs on a rather old version of Mac OS X, which is fundamentally a Unix-like operating system. If you're comfortable with working at the command line in Unix, Linux or Mac OS X Terminal, you can log onto the server and work with your files using the familiar Unix-type commands: ls, cd, mv, rm, etc.

If you're at the command line on a Unix or Linux system, or in the Terminal on Mac OS, you can use the ssh command to log onto the server:

ssh username@hostname

It will normally ask you for your password. For example:

$ ssh jtbell@web.presby.edu
Password: (enter password here)
Last login: Wed May  2 10:23:23 2012 from 10.54.100.100
Welcome to Darwin!
[titanium:~] jtbell$ 

If this is your first time using ssh, you may get a warning about the authenticity of the server, before being asked for the password. See this page for more information.

titanium is the actual hostname of the server. web.presby.edu is an alias that we can switch to a different server when we migrate to a new machine.

If you're using a Windows PC, a free program that people often use for this sort of thing is PuTTY. Someday maybe I'll write a page about how to set it up and use it. In the meantime you can try chapter 2 of the PuTTY manual.

Your personal web pages are in the subdirectory Sites of your home directory, so the command cd Sites should take you to them. If you "own" a set of organizational web pages, you can get to them with the command cd /Library/WebServer/Documents/organization. We often set up a link from an organization's web directory to its owner's home directory, in which case the command cd organization also works.

To edit your HTML files (which are of course plain text files), you can use the vi editor which is standard on Unix-like systems. We also have a simpler editor named pico. To create a new file, give the command pico; to edit an existing file, pico filename. The following screeenshot shows what it looked like while I was editing this page:

Basically, you move the cursor around using the arrow keys, and whatever you type is inserted at the location of the cursor. All commands use the control-key, which is indicated with a caret (^) in the listing at the bottom of the screen. For example, use control-X to exit. pico is pretty basic, but I find it handles about 97% of what I normally want to do when I'm editing.

Logging Off the Server

When you've finished doing whatever you're doing on the server, return to the command-line prompt by exiting pico or whatever other program you're using, Then press control-D to log off the server and "return" to your own computer.


This page was last updated by Jon Bell on 7 May 2012.


Presbyterian College > Academic Web Server > Support Info > Server Command Line