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]