> For the complete documentation index, see [llms.txt](https://ultimatewebsolutions.gitbook.io/qa-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ultimatewebsolutions.gitbook.io/qa-knowledge-base/linux-commands.md).

# Linux Commands

| Command      | What it does                                            | Typical QA use                                                                                                                                    |
| ------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ls`         | List files/directories                                  | Find files                                                                                                                                        |
| `ps`         | Show processes                                          | Check running processes                                                                                                                           |
| `scp`        | Copy files over SSH                                     | Transfer logs/files                                                                                                                               |
| `netstat`    | Show network connections/ports                          | Troubleshoot connectivity                                                                                                                         |
| `journalctl` | Read system logs                                        | Investigate errors                                                                                                                                |
| `systemctl`  | Manage system services                                  | Check/restart services                                                                                                                            |
| `grep`       | Used to search for text inside files or command output. | <p><code>grep "error" app.log</code></p><p>= Find <code>error</code></p><p><code>grep -c "error" app.log</code> </p><p>= count matching lines</p> |

`tail` is a Linux command used to **display the end of a file**. This lets you monitor the log and show only lines containing `ERROR`

```
tail -f application.log | grep ERROR
```

When a new log entry appears, you'll see it immediately.

The tail command displays the end of a file. I commonly use `tail -f` to monitor application logs in real time and troubleshoot issues.
