≡ Menu

running processes

Ubuntu Linux Stop a Process

How do I stop a process under Ubuntu Linux using command line and GUI tools?
[click to continue…]

How do I find out running processes were associated with each open port? How do I find out what process has open tcp port 111 or udp port 7000 under Linux?
[click to continue…]

Q. I'd like to find out if httpd / mysqld or sshd process is running or not under CentOS Linux server. How do I determine whether a process is running or not?

A. You need to use following commands:

[a] ps - It report a snapshot of the current processes

[b] grep - Filter out process names

Find out if sshd is Process is Running or Not

Type the following command at shell prompt:
$ ps -ewwo pid,args | grep [s]sh
Output:

5341 /usr/sbin/sshd
 5864 /usr/bin/ssh-agent x-session-manager
 6289 ssh oldbox
 7126 ssh admin@core.r1.vsnl.router

Where,

  • ps : Command name
  • -ewwo pid,args : -e option force to select all running processes. -o option is used to specify user-defined format. In our case we are forcing to display only program pid and its arguments. Finally -w option specifies wide output. Use this option twice for unlimited width.
  • grep [s]sh : We are just filtering out sshd string

Show All Running Processes in Linux

How do I see all running process in Linux operating systems using command line or GUI options?
[click to continue…]