Exercise with ps
Exercise with
ps
Chrome from GUI:
- Launch Chrome from the Linux GUI.
- In command-line, type ps
- Chrome is not in the list of processes. Why not?
- How do you make a list of processes that includes Chrome?
Chrome from command-line:
- Launch Chrome from command-line:
google-chrome &
- ps now shows Chrome
- It actually shows a program called "chrome" running, not "google-chrome".
- So what is google-chrome?
Type:
which google-chrome
- The program is a shell script. Look inside it (how?) to find where it leads. Last time I looked:
- Code leads into a shell function.
- Then back to the command-line. Maybe follow a trail of shortcuts.
- Into another shell script.
- And then finally a reference to the real "chrome" program, which is huge, and you can see on the command-line.