在 linux 下用 eclipse 开发 android 应用程序时,经常会碰到在调试的时候 eclipse 死掉了,并且点 叉叉 按钮又关不掉 eclipse .
这时候会让我们很怀念xp下的资源管理器程序,可以轻松关掉僵尸进程。其实在linux下面也可以的。 我们可以通过终端输入 PS -A命令来查看当前启动的进程有哪些 PID TTY TIME CMD 779 ? 00:00:00 rsyslogd 788 ? 00:00:00 dbus-daemon 804 ? 00:00:00 modem-manager 807 ? 00:00:00 avahi-daemon 808 ? 00:00:00 smbd 809 ? 00:00:00 avahi-daemon 816 ? 00:00:00 cupsd 832 ? 00:00:00 NetworkManager 845 ? 00:00:00 polkitd 873 tty4 00:00:00 getty 878 tty5 00:00:00 getty 888 tty2 00:00:00 getty 889 tty3 00:00:00 getty 891 tty6 00:00:00 getty 908 ? 00:00:00 acpid 912 ? 00:00:00 lightdm 918 ? 00:00:01 irqbalance 919 ? 00:00:00 cron 920 ? 00:00:00 atd 928 tty7 00:13:15 Xorg 981 ? 00:00:00 winbindd 995 ? 00:00:00 winbindd 1006 ? 00:00:00 xrdp 1008 ? 00:00:00 xrdp-sesman 1028 ? 00:00:00 bluetoothd 1032 ? 00:00:00 l2cap 1035 ? 00:00:00 krfcommd 1120 ? 00:00:00 accounts-daemon 1127 ? 00:00:00 console-kit-dae 1237 ? 00:00:00 upowerd 1297 ? 00:00:00 colord 1305 ? 00:00:00 rtkit-daemon 1377 tty1 00:00:00 getty 1397 ? 00:00:01 nmbd 1413 ? 00:00:00 cifsd 1448 ? 00:00:00 gnome-keyring-d 1457 ? 00:00:00 gnome-session 1487 ? 00:00:15 ibus-daemon 1497 ? 00:00:00 dbus-launch 1498 ? 00:00:00 ssh-agent 1501 ? 00:00:00 dbus-launch 1502 ? 00:00:00 dbus-daemon 1503 ? 00:00:02 dbus-daemon 1504 ? 00:00:00 ibus-gconf 1506 ? 00:00:11 python 1508 ? 00:00:00 ibus-x11 1514 ? 00:00:00 gconfd-2 1516 ? 00:00:00 gvfsd 1522 ? 00:00:00 gvfs-fuse-daemo 1530 ? 00:00:04 python 1541 ? 00:00:05 gnome-settings- 1559 ? 00:00:00 gconfd-2 1561 ? 00:00:00 notify-osd 1563 ? 00:00:00 gvfsd 1569 ? 00:00:00 gsd-printer 1574 ? 00:00:07 metacity 1577 ? 00:00:00 gnome-screensav 1582 ? 00:00:38 gnome-panel 1585 ? 00:00:02 pulseaudio 1589 ? 00:00:00 dconf-service 1593 ? 00:00:00 bluetooth-apple 1594 ? 00:00:00 nm-applet 1595 ? 00:00:00 polkit-gnome-au 1596 ? 00:00:00 gnome-sound-app 1597 ? 00:00:37 nautilus 1598 ? 00:00:00 gnome-fallback- 1606 ? 00:00:00 gconf-helper 1624 ? 00:00:00 gvfs-gdu-volume 1627 ? 00:00:00 udisks-daemon 1628 ? 00:00:00 udisks-daemon 1630 ? 00:00:00 notify-osd 1637 ? 00:00:00 gvfs-gphoto2-vo 1639 ? 00:00:00 gvfs-afc-volume 1642 ? 00:00:00 gvfsd-trash 1644 ? 00:00:00 mission-control 1659 ? 00:00:00 gvfsd-metadata 1661 ? 00:00:00 gvfsd-burn 1663 ? 00:00:00 telepathy-indic 1674 ? 00:00:00 gdu-notificatio 1677 ? 00:00:01 zeitgeist-datah 1683 ? 00:00:00 zeitgeist-daemo 1684 ? 00:00:00 cat 1694 ? 00:00:00 applet.py 1707 ? 00:00:18 ubuntuone-syncd 1728 ? 00:00:00 update-notifier 1743 ? 00:00:00 system-service- 1782 ? 00:00:00 deja-dup-monito 1790 ? 00:00:00 eclipse 1791 ? 00:04:49 java 1835 ? 00:00:02 adb 1910 ? 00:00:03 VirtualBox 1918 ? 00:00:05 VBoxXPCOMIPCD 1923 ? 00:00:12 VBoxSVC 1936 ? 00:58:20 VirtualBox 1965 ? 00:00:00 winbindd 2177 ? 00:00:05 gnome-terminal 2182 ? 00:00:00 gnome-pty-helpe 2183 pts/0 00:00:00 bash 2240 pts/1 00:00:00 bash 2323 ? 00:00:03 gedit 2346 ? 00:00:25 iptux 2758 ? 00:00:24 chromium-browse 2760 ? 00:00:05 chromium-browse 2762 ? 00:00:00 chromium-browse 2859 ? 00:00:07 chromium-browse 2937 ? 00:00:58 chromium-browse 2956 ? 00:03:05 npviewer.bin 2991 ? 00:00:00 kworker/0:2 3224 ? 00:00:01 chromium-browse 3257 ? 00:00:10 chromium-browse 3365 pts/2 00:00:00 bash 3420 pts/2 00:00:00 vim 3422 ? 00:00:00 kworker/0:1 3423 pts/3 00:00:00 bash 3477 pts/3 00:00:00 ps 1571 ? 00:00:00 gnome-fallback- 1575 ? 00:00:00 gconf-helper 1595 ? 00:00:00 gvfs-gdu-volume 1597 ? 00:00:00 udisks-daemon 1597 ? 00:00:00 udisks-daemon 1597 ? 00:00:00 udisks-daemon 这里面与eclipse 有关的有两个进程,分别是 1790 ? 00:00:00 eclipse 1791 ? 00:04:49 java 找到这两个进程后,执行 kill 1790 1791 就可以轻松杀死eclipse 这个僵尸进程了。