Basic Linux Learning (vi)

Source: Internet
Author: User

In this chapter, we will learn about the processes involved.

So, what is a process?

The process is actually the work that the CPU does not finish

We can see the process through the PS command.


PS command

PS parameters (Note that there are no-, there-are different meanings)

A # #关于当前环境的所有进程

X # #与当前环境无关的所有进程

F # #显示进程从属关系

E # #显示当前用户环境中的所有进程

L # #长列表显示进程的详细信息

U # #显示进程的用户信息


PS Ax-o%cpu,%mem,user,group.comm,nice # #指定显示进程的某些信息

%CPU # #显示进程的cpu负载

%mem # #显示进程内存负载

User # #进程用户

Group # #进程组

Comm # #进程名称

Nice # #进程优先级


PS ax-o%cpu,comm--sort <+|-%cpu> <+|-%mem> # #按照今晨信息排序

+ # #正序

-# #倒序

+%CPU # #按cpu负载正序排序

-%mem # #按内存负载倒序排序


# #进程优先级

The process has a priority range of 20 to 19, the smaller the number, the higher the priority level


Priority view

PS Ax-o Pid,nice,comm

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/88/69/wKiom1f2C5GB-icnAACv4J3ZDmc102.png-wh_500x0-wm_3 -wmp_4-s_1194983042.png "title=" 1.png "alt=" Wkiom1f2c5gb-icnaacv4j3zdmc102.png-wh_50 "/>

Specify a priority to open the program

Nice-n Priority number Process name

Nice-n-5 Vim # #后台开启vim并且指定程序优先级为-5


Change the process priority level

Reince-n Priority Digital Process PID

Renice-n-5 1806 # #改变1806进程的优先级为-5


# #环境中进程的前后台调用

Jobs # #查看被打入后台的进程

CTRL + Z # #把占用终端的进程打入后台

FG # #把后台进程调回前台

BG # #把后台暂停的进程继续运行

Command & # #让命令直接在后台运行


# #进程信号

Commonly used signal classes:

1 # #进程重新加载配置

2 # #删除进程在内存中的数据

3 # #删除鼠标在内存中的数据 (Let the mouse not display on the screen)

9 # #强行关闭单个进程

# #正常关闭进程

# #运行正在暂停的程序

# #暂停某个程序

# #把进程打入后台

Man 7 Singal # #查看信号详细信息


Kill-Signal Process PID

Killall-Signal Process name

Pkill-u Student-Signal


# #用户登录审计

W # #查看使用系统的当前用户有哪些

W-f ##-f see where to use


Last # #查看用户成功登陆历史

LASTB # #查看用户未成功登陆历史


# #top命令

Top # #监控系统负载工具


Basic Linux Learning (vi)

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.