Ubuntu viewing and killing process [go]

Source: Internet
Author: User

When I closed Webrick in NetBeans today, I found that it was not closed, the localhost:3000 still showed the page and found that it could not be closed again from NB.
Only the process that goes into Ubuntu shuts down
To view a process:
1 Law, ps-e command

[Email protected]:~$ sudo netstat-antup
Active Internet connections (servers and established)
Proto recv-q send-q Local address Foreign address State Pid/program Name
TCP 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4672/cupsd
TCP 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 7082/ruby
TCP 0 0 192.168.1.102:41121 66.113.164.119:80 established 5709/firefox
TCP 0 0 192.168.1.102:44746 209.85.201.125:5222 established 6130/pidgin
TCP 0 0 192.168.1.102:54797 192.168.1.128:3306 established 7082/ruby
TCP 0 0 192.168.1.102:43466 64.4.34.77:1863 established 6130/pidgin
TCP 0 0 192.168.1.102:41999 64.233.189.19:443 established 5709/firefox
TCP 0 0 192.168.1.102:54900 58.251.60.53:80 established 6130/pidgin
TCP 0 0 192.168.1.102:34180 220.181.37.210:80 time_wait-
TCP6 0 0:: 1:42801:::* LISTEN 6863/java
UDP 0 0 0.0.0.0:68 0.0.0.0:* 5161/dhclient
UDP 0 0 0.0.0.0:5353 0.0.0.0:* 4625/avahi-daemon:
UDP 0 0 0.0.0.0:56699 0.0.0.0:* 4625/avahi-daemon:

The process of killing Webrick:
[Email protected]:~$ sudo kill 7082

2 Law:
Firefox, for example, is now zombie and cannot be requested accordingly. Open a terminal and enter:

Pgrep Firefox

Returns a value, such as 7198. Now enter:

Kill 7198

Will kill the Firefox process.

You can also use the Killall command. Killall can use the name of the program, such as input:

Killall Firefox

3 methods

If the former two still kill, with kill-9 PID command, to the lore

Ubuntu viewing and killing process [go]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.