07 ps

上一篇 / 下一篇  2019-01-04 10:21:21 / 个人分类:Linux

Ps

 

ps aux

 

linux-37qq:~ # ps aux | grep sbin

root       421  0.0  0.0  17004   548 ?        S<s   2018   0:00 /sbin/udevd --daemon

root      1317  0.0  0.0   4004   508 ?        Ss    2018   0:00 /sbin/acpid

root      1350  0.0  0.0  19308   712 ?        Ss    2018   0:00 /sbin/syslog-ng

root      1353  0.0  0.0   4272   612 ?        Ss    2018   0:00 /sbin/klogd -c 1 -x

 

aall

u:显示用户id

x:显示在哪个终端

 

查看进程的头几行:ps aux | head -4

 

linux-37qq:~ # ps aux | head -4

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root         1  0.0  0.0  10540   728 ?        Ss    2018   0:03 init [5] 

root         2  0.0  0.0      0     0 ?        S     2018   0:00 [kthreadd]

root         3  0.0  0.0      0     0 ?        S     2018   0:00 [ksoftirqd/0]

 

linux-37qq:~ #ps aux | grep sbin/min | grep -v 'grep'

root      3850  0.0  0.0   4496   764 tty1     Ss+   2018   0:00 /sbin/mingetty --noclear tty1

root      3851  0.0  0.0   4496   764 tty2     Ss+   2018   0:00 /sbin/mingetty tty2

linux-37qq:~ #ps aux | grep sbin/min

root      3850  0.0  0.0   4496   764 tty1     Ss+   2018   0:00 /sbin/mingetty --noclear tty1

root      3851  0.0  0.0   4496   764 tty2     Ss+   2018   0:00 /sbin/mingetty tty2

root      8246  0.0  0.0   4536   564 pts/0    S+   18:17   0:00 grep sbin/min

 

运行firefox程序

直接firefox

 

Firefox$     表示后台运行,不影响当前终端

Jobs查看后台任务

Fg  %1表示将后台任务调到前台来运行  其中1表示jobs中查询的id

Bg%1后台运行

 

Pstree  查看进程树

Pkill-9进程名     


TAG:

 

评分:0

我来说两句

日历

« 2024-04-25  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 5110
  • 日志数: 33
  • 建立时间: 2018-04-23
  • 更新时间: 2019-01-04

RSS订阅

Open Toolbar