diff --git a/Linux/LPIC1/16-ps.md b/Linux/LPIC1/16-ps.md new file mode 100644 index 0000000..36b1d94 --- /dev/null +++ b/Linux/LPIC1/16-ps.md @@ -0,0 +1,65 @@ +# βš™οΈ PS Command + +The `ps` (process status) command is used to **view running processes** on a Linux system. It’s useful for monitoring and troubleshooting tasks. + +--- + +## 🧾 Basic Usage + +### πŸ” Show tasks in the current shell + +```bash +ps +``` + +### πŸ” Show tasks in the current shell with **full info** + +```bash +ps -f +``` + +--- + +## 🌍 View System-Wide Processes + +### πŸ“‹ Show **all** processes + +```bash +ps -A +# or +ps -e +``` + +--- + +### πŸ‘€ Show tasks by **specific user** + +```bash +ps -u +``` + +πŸ“Œ Replace `` with the actual user name. + +--- + +### πŸ“Š Show **detailed info for all** tasks + +```bash +ps aux +``` + +--- + +## πŸ“˜ Output Fields Explained + +| Column | Description | +| --------- | -------------------------------------------------- | +| `USER` | Owner of the process (often `root` or your user) | +| `PID` | Process ID | +| `%CPU` | CPU usage percentage | +| `%MEM` | Memory usage percentage | +| `STAT` | Process state: `R` (running), `S` (sleeping), etc. | +| `START` | Time when the process started | +| `TIME` | Total CPU time used | +| `COMMAND` | Command that started the process | +