7
|
1 |
-*- outline -*-
|
|
2 |
|
|
3 |
* Process list.
|
|
4 |
|
|
5 |
** FreeBSD.
|
|
6 |
|
|
7 |
View current user process:
|
|
8 |
|
|
9 |
$ ps
|
|
10 |
|
|
11 |
View all running process:
|
|
12 |
|
|
13 |
$ ps -ax
|
|
14 |
|
|
15 |
** Linux.
|
|
16 |
|
|
17 |
View current user process:
|
|
18 |
|
|
19 |
$ ps
|
|
20 |
|
|
21 |
View all running process:
|
|
22 |
|
|
23 |
$ ps -e
|
|
24 |
|
|
25 |
** Solaris.
|
|
26 |
|
|
27 |
TODO
|
|
28 |
|
|
29 |
* Process info.
|
|
30 |
|
|
31 |
Show user, pid, ppid, pgid, sid, jobc, state, time, command, etc.
|
|
32 |
|
|
33 |
** Linux.
|
|
34 |
|
|
35 |
$ ps -f <id>
|
|
36 |
|
|
37 |
** FreeBSD.
|
|
38 |
|
|
39 |
$ ps -j <id>
|
|
40 |
|
|
41 |
or
|
|
42 |
|
|
43 |
$ ps -l <id>
|
|
44 |
|
|
45 |
* Killing process.
|
|
46 |
|
|
47 |
TODO
|
|
48 |
|
|
49 |
* Run as another user.
|
|
50 |
|
|
51 |
** Linux.
|
|
52 |
|
|
53 |
$ su - <user>
|
|
54 |
$ <command>
|
|
55 |
|
|
56 |
or
|
|
57 |
|
|
58 |
$ sudo -u <user> -i <command>
|
|
59 |
|