Processes

From SHellium Wiki
Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

Contents

List processes

  • To list all processes running on the shell type the following:
ps

ps displays the list of currently running processes and their process ID (PID) numbers (ps stands for "print status" or "process status"). Use

 ps axu 

to see all processes currently running on your system, including those of other users and those without a controlling terminal, each listed by username of the owner.

  • To list all processes being run by a certain user, type
ps -u <username>
  • To list all processes being run by you and show some statistics like, memory and cpu usage usage for each of your processes do:
ps ux
  • To view all available options for the ps command use:
 man ps

Find a process by name

If you want to find out whether a particular process is being run, do

ps -A | grep <program-name>

The -A switch lists all processes. Piping the output of ps through grep enables us to check for a particular program. Since grep accepts regular expressions, this should allow you to perform complex searches.

For example, to check for all processes starting and ending in a p,

ps -A | grep 'p.*p'

Killing processes

  • First, you need to grab the PID of the process. You can do this by running
ps ux | grep psybnc | grep -v grep | awk '{print$2}'

(yes, '{print$2}' really is '{print$2}').

or:

ps ux | grep psybnc | cut -d " " -f3
  • Change the psyBNC for the process you want to kill. A number will appear. This number is the PID. With this number, do
kill -9 <PID>

changing <PID> for the number.

Kill a process by name

  • You can use the killall command to kill a process using its name instead of the process ID.
killall <process-name>
Personal tools
Namespaces

Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox