More UNIX Commands

More UNIX Commands

This document provides descriptions of selected UNIX commands.


echo

The command echo MY_VARIABLE displays the current value of environment variables. Two variables that might interest you at some point are $PRINTER and $DISPLAY.


finger

The command finger user_name gives you information on the user specified by user_name. The argument user_name can be the name of someone locally (i.e. jpower) or someone at a remote location (i.e. jpower@bcm.tmc.edu).


grep

The command grep string filename searches filename for string. It outputs every line which contains string. The form grep -v string filename outputs every line which does not contain string. The argument string is read by grep as a regular expression.


kill

The command kill my_process sends a terminate signal to the process specified by the process id (PID) my_process. In cases where the terminate signal does not work, the command kill -9 my_process sends a kill signal to the process. For info on getting the PID for a process, see ps.


lpq

The command lpq outputs the current queue for the default printer (see echo). The form lpq -Pother_printer outputs the current queue for other_printer.


lprm

The command lprm job_number removes job_number from the queue for the default printer (see echo). To remove a job, you must be the owner of that job. To find job_number to send to lprm, use the command lpq. The form lprm -Pother_printer job_number removes job_number from the print queue of other_printer.


man

The command man command displays the UNIX manual page for command. The manual pages describe usage and options for every UNIX command.


passwd

The command passwd allows you to change the password you use to login to the computer. The process is self-explanatory once you type the command.


ps

The command ps lists the processes running on your machine. The form ps gux lists only your processes. The form ps aux lists all processes running on your machine. The second column of the listing, the PID column, provides the information required by the kill command.


whois

The command whois lookup_string performs a directory lookup on persons at your home institution, where lookup_string is all or part of someone's first name, last name, or phone number.


[basic UNIX commands] [UNIX Survival home page]