Generally Useful Commands
ps (Process Status)
The ps command provides a list of processes that you are currently running on the machine. The list shows the information for each process in four categories:
- Process ID (PID) - a unique number assigned to the process.
- Terminal line (TTY) - the terminal number that the process was started from.
- Run time (TIME) - how much computer time the process has used.
- Command (CMD) - the command that is being processed.
Here's an example of the output for ps, showing only the shell being used and ps itself being processed at that moment in time.
The ps aux command displays a list of all processes being run by all users on the machine. Here's an example of the command's output:
kill (Terminate a Process)
One of the most useful commands to know when you are running your own Unix machine is kill. This command terminates a process, given that you know that process's PID. Enter the command followed by the PID of the process you want to kill (generally, you find the PID in your ps output). kill has varying degrees of intensity, depending on how hard it is to get rid of a process. The intensity rating ranges from 1 to 9, with 9 being the strongest. So if you really wanted to kill a pesky process that won't go away, you would enter something like this at the command line:
find (Search For Files)
Another useful command is find, which searches for files. find can be complex, but a simple ways to search is shown in the example below.
find, look at its man page.)
A more intuitive search command is locate, which is unfortunately not available on the UA clusters. You would, however, most likely find it on your personal Linux distribution. Follow the locate command with the name or partial name of files you are looking for: