lk/README.md

97 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2022-01-16 19:28:02 +00:00
---
title: "Knowledge Base"
---
2021-05-15 14:10:30 +00:00
# Linux Knowledgebase
2020-01-02 00:04:35 +00:00
2021-05-15 14:10:30 +00:00
This is a list of quickstart guides for Linux programs, designed to get the user up and running as fast as possible.
# Style
2020-01-02 00:04:35 +00:00
2022-12-01 18:53:50 +00:00
## Praxis Only
We leave theory alone as much as possible.
The documentation should be of the form 'if you want *X*, type *Y*'.
We don't need to explain what a program does - anyone looking up 'how to X', already knows what they want to do.
We don't even need to explain which program to use - if someone wants to combine an mp4 and webm video into a single video file, they only care about that result, not about learning `ffmpeg`.
Any interest in these tools only comes after we can use them.
## Chronological
Entries should read like scripts - everything in the right order, with small notes on what this does.
The chronology should never branch.
If `gitea` can use three different types of database, the documentation should simply pick one and continue instructions from there.
Repetition works better than a reference - if a database requires three commands to set up, it's better to repeat those three commands for every program that requires a database than to just link to another file which discusses databases.
2024-04-19 15:28:37 +00:00
---
2023-08-03 16:48:13 +00:00
### Closing
Introductory documents should show anything required to cleanly uninstall a program, without leaving bulky configuration files behind.
2022-12-01 18:53:50 +00:00
## Three Input Types
There are three types of examples:
Fixed input:
2023-08-03 16:48:13 +00:00
```bash
ls
```
2022-12-01 18:53:50 +00:00
2023-08-03 16:48:13 +00:00
Anything with arbitrary input should be shown as a variable.
2022-12-01 18:53:50 +00:00
2023-08-03 16:48:13 +00:00
```bash
ls $FILE
```
2022-12-01 18:53:50 +00:00
2023-08-03 16:48:13 +00:00
Non-commands (e.g. output) should be shown as quoted text:
2022-12-01 18:53:50 +00:00
2023-08-03 16:48:13 +00:00
> LK img
> Mail kn
> Projects music
2022-12-01 18:53:50 +00:00
2024-04-19 15:28:37 +00:00
---
2022-12-01 18:53:50 +00:00
# Example
2021-02-23 22:10:01 +00:00
```
How to see which websites you're actively accessing:
2023-08-03 16:48:13 +00:00
` ` `bash
ss -tr dst :$PORT
` ` `
2024-04-10 21:42:21 +00:00
> State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
> ESTAB 0 0 192.168.0.14:42476 149.154.167.91:https
> ESTAB 0 0 192.168.0.14:43644 104.17.90.199:https
2021-02-23 22:10:01 +00:00
```
2020-01-02 00:30:38 +00:00
# What's wrong with everything else?
## Man pages
- Orders items by the alphabet rather than by relevance.
- Often presumes you know everything except that one program.
- Often written in the 80's, and it shows.
- Zero respect for your time.
2020-01-05 12:33:53 +00:00
## curl cheat.sh/
2020-01-02 00:30:38 +00:00
- Doesn't have the programs I like.
- Too short to get you started on many programs.
2020-01-26 16:08:17 +00:00
- Poor understanding of priority (`git stash` is covered before `git commit`).
2020-01-02 00:30:38 +00:00
2020-01-02 02:49:45 +00:00
# Current State
2020-01-02 00:30:38 +00:00
2020-01-02 02:49:45 +00:00
This started as a few personal notes, and will probably continue to look like that for some time.
It's a bit of a mess.
2020-01-02 18:24:30 +00:00
2022-01-26 22:35:07 +00:00
Systemd is taken as a default.
2023-08-03 16:48:13 +00:00
Non-systemd commands are mentioned when required for a distro, e.g. runit for Void Linux.
2022-01-26 22:35:07 +00:00