forked from Snifer/security-cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ps
28 lines (20 loc) · 781 Bytes
/
ps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# alex <alexbujduveanu>
# To list every process on the system:
ps aux
# To list a process tree
ps axjf
# To list every process owned by foouser:
ps -aufoouser
# To list every process with a user-defined format:
ps -eo pid,user,command
# List the processes being run by a particular set of usernames
ps -f -u username1, username2, .... ,usernameN
# Display a list of processes with a particular parent ID (5589)
# Note that when a process is launched it may spawn several other sub processes which all share a common parent process ID
ps -f -ppid 5589
# List processes with given PIDs
ps -f -p 25001, 4567, 789
# Display all processes owned by the current user
ps -U $USER
# Sort processes based on CPU and memory usage (useful for finding memory leaks)
ps aux --sort pmem