change formatting

input examples are now given as

```bash
input $ARG1
```

While outputs use md's '> ' sign as a quote.
This commit is contained in:
2023-06-17 21:28:20 +02:00
parent 1ba3010b81
commit ba8026e0c3
102 changed files with 2388 additions and 3211 deletions

View File

@@ -5,10 +5,11 @@ tags: [ "Documentation", "Void" ]
Make the autologin service:
> cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
```bash
cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
```
```sh
if [ -x /sbin/agetty -o -x /bin/agetty ]; then
# util-linux specific settings
if [ "${tty}" = "tty1" ]; then
@@ -24,7 +25,7 @@ TERM_NAME=linux
Then stick this at the end of the bashrc:
```
```sh
# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx

View File

@@ -4,13 +4,19 @@ tags: [ "Documentation", "Void" ]
---
Monitor all processes:
> extrace
```bash
extrace
```
Monitor one process:
> extrace ls
```bash
extrace ls
```
Monitor a script:
> ./script.sh | extrace
```bash
./script.sh | extrace
```

View File

@@ -6,35 +6,49 @@ tags: [ "Documentation", "Void" ]
All possible services are in:
> ls /etc/sv
```bash
ls /etc/sv
```
The computer only uses those in /var/service, so symbolic links are made to start and stop services.
> ls /var/service
```bash
ls /var/service
```
# Start Services
Enable the sshd service, so that ssh will work every time you boot up:
> sudo ln -s /etc/sv/sshd /var/service
```bash
sudo ln -s /etc/sv/sshd /var/service
```
Then start the service:
> sudo sv start sshd
```bash
sudo sv start sshd
```
# Stop Services
Stop `mpd` with:
> sudo sv stop mpd
```bash
sudo sv stop mpd
```
And stop it automatically loading at startup with:
> sudo rm /var/service/mpd
```bash
sudo rm /var/service/mpd
```
You can also just make a file called 'down':
> sudo touch /var/service/mpd/down
```bash
sudo touch /var/service/mpd/down
```
This means you can start and stop the service without making symbolic links, but mpd will be 'down' when the computer starts.
@@ -49,5 +63,7 @@ If unsure, use `#!/bin/bash` as the first line. When Void Linux says `sh`, it m
Confirm the shell you'll use:
> ls -l $(which sh)
```bash
ls -l $(which sh)
```

View File

@@ -6,7 +6,9 @@ tags: [ "Documentation", "Void" ]
Update all packages with
> sudo xbps-install -Su
```bash
sudo xbps-install -Su
```
See [xbps](xbps.md) for more.
@@ -15,21 +17,29 @@ See [xbps](xbps.md) for more.
Void keeps *every* version of everything you install, so you can roll back to them.
Remove old packages with:
> sudo xbps-remove -O
```bash
sudo xbps-remove -O
```
# vkpurge
Old Void kernels are left on the boot partition. List them with:
> vkpurge list
```bash
vkpurge list
```
Remove one with:
> vkpurge 2.8.2_4
```bash
vkpurge 2.8.2_4
```
Remove all but the latest with:
> vkpurge rm all
```bash
vkpurge rm all
```
# Brightness
@@ -38,9 +48,10 @@ You can change this number to change the screen brightness.
For an easy utility, install `brightnessctl`.
> brightnessctl s 10%-
> brightnessctl s 10%+
```bash
brightnessctl s 10%-
brightnessctl s 10%+
```
# Other Tricks

View File

@@ -6,61 +6,87 @@ tags: [ "Documentation", "Void" ]
Look for cowsay in the repository:
> xbps-query --repository --search cowsay
```bash
xbps-query --repository --search cowsay
```
Short version:
> xbps-query -Rs cowsay
```bash
xbps-query -Rs cowsay
```
Search with regex:
> xbps-query --regex -Rs 'cow(s)?\w'
```bash
xbps-query --regex -Rs 'cow(s)?\w'
```
List what's required for cowsay
> xbps-query -x cowsay
```bash
xbps-query -x cowsay
```
What packages are orphaned (i.e. installed as a dependency for another package, which has since been removed)?
> xbps-query -O
```bash
xbps-query -O
```
Show cowsay's dependencies.
> xbps-query -x cowsay
```bash
xbps-query -x cowsay
```
This shows `perl`.
To see what else depends on perl:
> xbps-query -X perl
```bash
xbps-query -X perl
```
List all manually installed software.
> xbps-query -m
```bash
xbps-query -m
```
## Install
Install cowsay
> xbps-install cowsay
```bash
xbps-install cowsay
```
Upgrade current packages.
`-R` looks at repositories, `-s` makes a sloppy search (for rough matches).
> xbps-install -Suv
```bash
xbps-install -Suv
```
## Remove/ Uninstall
Remove cowsay
> xbps-remove cowsay
```bash
xbps-remove cowsay
```
...and all dependencies
> xbps-remove -R cowsay
```bash
xbps-remove -R cowsay
```
Remove all orphaned dependencies.
> xbps-remove -o
```bash
xbps-remove -o
```
Show information about cowsay
@@ -68,13 +94,19 @@ Show information about cowsay
Reinstall cowsay
> xbps-install -f cowsay
```bash
xbps-install -f cowsay
```
Look for broken packages.
> sudo xbps-pkgdb -a
```bash
sudo xbps-pkgdb -a
```
And if you've found any, you might reconfigure all packages forcefully:
> sudo xbps-reconfigure -af
```bash
sudo xbps-reconfigure -af
```