View processes and shut down process commands in ubuntu
Source: Internet
Author: User
Run the "liujl @ liujl-laptop: ~" command to view and shut down processes in ubuntu :~ $ Sudonetstat-antup [sudo] passwordforliujl: activate the Internet connection (the server and the established connection) ProtoRecv-QSend-QLocalAddressForeig... run the "liujl @ liujl-laptop: ~" command to view and shut down processes in ubuntu :~ $ Sudo netstat-antup [sudo] password for liujl: activates Internet connections (servers and established connections) proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name www.2cto.com tcp 0 0.0.0.0: 24101 0.0.0.0: * LISTEN 10459/qq tcp 0 0 127.0.0.1: 7634 0.0.0.0: * LISTEN 15995/hddtemp tcp 0 0 127.0.0.1: 631 0.0.0.0: * LISTEN 1438/cupsd tcp 1 0 10.10.86.114: 46676 rows: 80 CLOSE_WAIT 14323/gvfsd-httptcp 0 0 127.0.0.1: 76 34 127.0.0.1: 36612 TIME_WAIT-tcp 0 10.10.86.114: 47933 202.108.23.238: 80 ESTABLISHED 2261/firefox tcp 0 0 127.0.0.1: 24101 127.0.0.1: 52166 ESTABLISHED...... PID is the number of the remote process on the port # sudo kill PID (process code) liujl @ liujl-laptop :~ $ Ps-e pid tty time cmd 1? 00:00:01 init 2? 00:00:00 kthreadd 3? 00:00:00 migration/0 4? 00:00:00 ksoftirqd/0 5? 00:00:00 watchdog/0 6? 00:00:00 migration/1 7? 00:00:02 ksoftirqd/1 8? 00:00:00 watchdog/1 9? 00:00:00 events/0 10? 00:00:00 events/1 11? 00:00:00 cpuset 12? 00:00:00 khelper 13? 00:00:00 netns... Check the process numbers of all programs.
Its description is listed below: liujl @ liujl-laptop :~ $ Ps -- help ********** simple selection ********************* selection by list **** * ***-A all processes-C by command name-N negate selection-G by real group ID (supports names) -a all w/tty handle T session leaders-U by real user ID (supports names) -d all privileges T session leaders-g by session OR by valid tive group name-e all processes-p by process IDT all processes on this terminal-s processes in the sessions givena all w/tty, including other users-t by ttyg OBSOLETE -- do not use-u by valid tive user ID (supports names) r only running processes U processes for specified usersx processes w/o controlling ttys t by tty www.2cto.com ************ output format ******** * ************ long options ************-o, o user-defined-f full -- Group -- User -- pid -- cols -- ppid-j, j job control s signal -- group -- user -- sid -- rows -- info-O, O preloaded-o v virtual memory -- cumulative -- format -- deselect-l, l long u user-oriented -- sort -- tty -- forest -- version-F extra full X registers -- heading -- no-heading -- context ********* misc options * * *******-V, V show version L list format codes f ASCII art forest-m, m,-L,-T, H threads S children in sum-y change-l format-M, Z security data c true command name-c scheduling class-w, w wide output n numeric WCHAN, UID-H process hierarchy author richerg85
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.