Processes and Running Things

In one of my first posts I talked about this thing called a process. It happens when you run any program on a Linux® system, you create a process. If these things are running, how do I see them? Well, Linux&reg keeps them a table called a process table. We can see them with the command ps. You run it like:

Alpha:~ computerlamp$ ps

The output is kind of boring. It looks like:

  PID TTY          TIME CMD
17245 pts/2    00:00:00 bash
17248 pts/2    00:00:00 ps

It is just the processes that I’m currently running. bash is a shell and that is a program that gives me my command lines. We’ve been using it all along. There’s many kinds of shells, bash is one of the most common. It stands for Bourne Again Shell and was called that because it was a written as a replacement for a Bourne Shell. Wikipedia says it was first released in 1989. It’s been around a long time and it’s the standard command line interface on most Linux® systems.

The second command is the ps that we ran to get that command. If we had used any flags with ps, we would see those too.

The first column is the process id. Remember, Linux® understands numbers better than strings, so every process gets a number. It uses that id to refer to the process.

The second column is the tty. That stands for teletypewriter, a very very old device. According to Wikipedia it’s a typewriter that can be used to send messages to another typewriter. How’s that for very old school? Linux® took that history and made a tty mean terminal or output device. It’s the output device that that command is hooked up to.

ps is a command with many flags. Many MANY flags. We’ll talk about those in more posts.

Leave a Reply

Your email address will not be published. Required fields are marked *