UNIX Information

Connecting to a UNIX Server

All of our UNIX machines can be remotely accessed through a protocol called SSH. Windows users will need to install SecureCRT, PuTTy, or another SSH client. Mac and Linux machines typically come with SSH clients installed.

Note that the UNIX machines are only accessible on the campus network (including on PAL). You need to use the Purdue VPN to connect from off-campus.

You will need to know which server you want to connect to. Undergraduate student accounts are typically housed on tools.ecn.purdue.edu. Grad students, faculty, and staff are typically housed on widget.ecn.purdue.edu.

Connecting with SecureCRT

All Purdue-owned machines, including ME or ECN-managed machines, should have SecureCRT installed.

Go to File > Quick Connect, or click the Quick Connect icon in the toolbar (the one with the lightning bolt). Type the name of your home server in the "Hostname" field. Type your career account username in the "Username" field. Make sure the "Port" is set to 22, then hit Enter or click the "Connect" button. Type your career account password when prompted.

Connecting with PuTTy

Type your home server name in the "Host Name" box. Make sure the "Port" is set to 22. Enter your career account username & password when prompted. Note that nothing will show on the screen while you type in your password.

Connecting from Mac/Linux/UNIX

From your terminal emulator of choice, run ssh [username]@[server], replacing [username] with your career account username & [server] with the name of your home server. Type in your career account password when prompted. Note that nothing will show on the screen while you type in your password.

UNIX Shells & Configuration

Since most of UNIX is driven from the command line, it is a good idea to learn about the shell, the interface through which you enter commands & control the system. The shell can also be scripted, allowing you to write short programs to automate tasks on the machine. Many UNIX programs, including the shells, store configuration information in environment variables and files in your home directory whose names begin with '.'s, commonly referred to as dotfiles. In the case of the shell, environment variables get set in different dotfiles, depending on which shell you use.

The default shell on most of ME's UNIX machines is tcsh. If you'd like to use a different shell, run the chsh command, enter your career account password, and reference the table below for the paths to the shells that are typically installed on our machines. For more information about these configuring these shells, please consult the UNIX man pages or your favorite search engine.

Shell Executable Path Dotfile(s)
T-Shell /usr/local/bin/tcsh .login, .cshrc
Bourne Shell /bin/sh .profile
Bash /usr/local/bin/bash .profile, .bashrc
Korn Shell /bin/ksh .profile
Z Shell /bin/zsh .login, .zshrc
C Shell /bin/csh .login, .cshrc

Setting UNIX Path

On UNIX systems, PATH is a special environment variable that stores a list of directories, in order, that are searched for executable programs to run. You can see your current PATH by running echo $PATH. A default PATH is set by the system when your account is created, but you may want to add other directories later. Your PATH can be changed in either your .login or .profile file, depending on which shell you're using.

Viewing Your Running Processes

To check to see what processes you have running on a server, run ps -ef | grep ^`whoami`. Note the special characters - the '|' (pipe) is located above the enter key, the '^' (caret) is typed with SHIFT+6, and the '`' (backtick) is located to the left of the 1 key. That command will output something like the following:

thomps78  4396 32445  0 14:11 pts/0    00:00:00 ps -ef
thomps78  4397 32445  0 14:11 pts/0    00:00:00 grep thomps78
thomps78 32405 32403  0 10:09 ?        00:00:00 sshd: thomps78@pts/0
thomps78 32408 32406  0 10:09 ?        00:00:00 sshd: thomps78@notty
thomps78 32409 32408  0 10:09 ?        00:00:00 tcsh -c /usr/libexec/openssh/sftp-server
thomps78 32445 32405  0 10:09 pts/0    00:00:00 -tcsh
thomps78 32458 32409  0 10:09 ?        00:00:00 /usr/libexec/openssh/sftp-server

The output lists, in order, the user that own the process, a unique process ID number (PID), PID of the process's parent, CPU usage, when the process was started, what terminal the process is attached to, the total time the process has been using the CPU, and finally the actual command.

Killing a Process

If you have a process running out of control or something has gotten stuck from a previous session, you can kill the unwanted process. Use the command in the Viewing Your Running Processes section to find the PID (2nd column) of the process you want to end. Once you found the PID (and are sure it's the right one!), run kill -9 PID, replacing PID with the PID of the misbehaving process.

Purdue University, 610 Purdue Mall, West Lafayette, IN 47907, (765) 494-4600

© 2019 Purdue University | An equal access/equal opportunity university | Copyright Complaints | Maintained by Mechanical Engineering Technical Services

Trouble with this page? Disability-related accessibility issue? Please contact us at mecl@purdue.edu.