惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
爱范儿
爱范儿
WordPress大学
WordPress大学
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
B
Blog
博客园 - 叶小钗
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
H
Help Net Security
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
月光博客
月光博客

NickChenyx's Blog

Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish
Create_Rubbish
nickChen · 2018-04-18 · via NickChenyx's Blog

Linux 查看进程启动命令和环境变量

Created At :

Count:121 Views 👀 :

  1. 查询目标进程,通过 ps -ef | grep {target process name} 查询进程 pid(ps -aux 也行)
  2. cat /proc/{pid}/cmdline 可以查询到进程的启动参数,但是现在的格式不大好读,可以用下面的命令优化下输出
  3. cat /proc/{pid}/cmdline | tr "\0" "\n" 用空格分割各个运行时参数,方便阅读
  4. cat /proc/{pid}/environ | tr "\0" "\n 可以查询到进程运行时的环境变量

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 nickchenyx@gmail.com

Title:Linux 查看进程启动命令和环境变量

Count:121

Author:nickChen

Created At:2022-10-14, 22:11:43

Updated At:2023-05-08, 23:27:10

Url:http://nickchenyx.github.io/2022/10/14/linux_show_proc_cmdline/

Copyright: 'Attribution-non-commercial-shared in the same way 4.0' Reprint please keep the original link and author.