change ``bash headers to ``sh

This commit is contained in:
2025-08-22 15:59:04 +02:00
parent 3e049e1687
commit 8eea348112
80 changed files with 773 additions and 555 deletions

View File

@@ -7,7 +7,7 @@ tags: [ "distros", "arch" ]
Edit `/etc/systemd/system/getty@tty1.service.d/override.conf` by typing:
```bash
```sh
sudo systemctl edit getty@tty1
```

View File

@@ -5,17 +5,17 @@ requires: [ "partitions", "time" ]
---
Keyboard layout changed.
```bash
```sh
ls /usr/share/kbd/keymaps/**/*.map.gz
```
```bash
```sh
loadkeys uk.map.gz
```
Check if boot mode is UEFI
```bash
```sh
ls /sys/firmware/efi/efivars
```
@@ -23,115 +23,115 @@ Without efivars, the system must boot with BIOS.
# Check network's up
```bash
```sh
ping archlinux.org
```
Set system clock properly
```bash
```sh
timedatectl set-ntp true
```
Check disks
```bash
```sh
lsblk
```
Make partition
```bash
```sh
parted -s /dev/sda mklabel gpt
```
```bash
```sh
parted -s /dev/sda mklabel msdos
```
```bash
```sh
parted -s /dev/sda mkpart primary ext4 512 100%
```
```bash
```sh
parted -s /dev/sda set 1 boot on
```
```bash
```sh
mkfs.ext4 /dev/sda1
```
Use pacstrap to get the base install.
```bash
```sh
mount /dev/sda1 /mnt/
```
```bash
```sh
pacstrap /mnt base base-devel vim linux linux-firmware
```
Make fstab notes for new system.
```bash
```sh
genfstab -U /mnt >> /mnt/etc/fstab
```
```bash
```sh
arch-chroot /mnt
```
```bash
```sh
echo 'en_GB.UTF-8' > /etc/default/locale
```
```bash
```sh
pacman -Sy networkmanager grub
```
For legacy:
```bash
```sh
grub-install --target=i386-pc /dev/sda
```
For EFI:
```bash
```sh
sudo pacman -S efibootmgr
```
```bash
```sh
mkdir /boot/efi
```
```bash
```sh
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --remmovable
```
```bash
```sh
grub-mkconfig -o /boot/grub/grub.cfg
```
set local time
```bash
```sh
ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime
```
Find the desired locale's and uncomment them.
```bash
```sh
vi /etc/locale.gen
```
```bash
```sh
locale-gen
```
Make your keyboard changes permenent with:
```bash
```sh
vi /etc/vconsole.conf
```
@@ -140,13 +140,13 @@ unsure about this bit - is this name just for the loadkeys function?
Make a hostname
```bash
```sh
echo pc > /etc/hostname
```
Set hostnames for network, or at least your own.
```bash
```sh
vi /etc/hosts
```
@@ -160,27 +160,27 @@ If the system has a permanent IP address, it should be used instead of localhost
Ping some sites to make sure the network's working
```bash
```sh
passwd
```
```bash
```sh
exit
```
```bash
```sh
umount -R /mnt
```
Remove that awful beep sound:
```bash
```sh
rmmod pcspkr
```
...and make the change permanent:
```bash
```sh
sudo echo "blacklist pcspkr" >> /etc/modprobe.d/nobeep.conf
```

View File

@@ -13,7 +13,7 @@ Include = /etc/pacman.d/mirrorlist
And update:
```bash
```sh
sudo pacman -Syu
```
@@ -21,7 +21,7 @@ sudo pacman -Syu
Check your graphics card type:
```bash
```sh
lspci | grep VGA
```
@@ -31,7 +31,7 @@ lspci | grep VGA
If you see `Nvidia`, then install the intel drivers:
```bash
```sh
sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader
```
@@ -39,7 +39,7 @@ sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-lo
If you see `Intel`, then install the intel drivers:
```bash
```sh
sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-intel
```
@@ -47,16 +47,16 @@ sudo pacman -S --needed lib32-mesa vulkan-intel lib32-vulkan-intel vulkan-icd-lo
If you see `AMD`, then check your card support `vulkan`:
```bash
```sh
yay -S gpu-viewer
```
```bash
```sh
vulkaninfo | grep 'VkPhysicalDeviceVulkanMemoryModelFeatures' -A 3
```
You should see 'true' here.
```bash
```sh
sudo pacman -S --needed lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-amdgpu
```

View File

@@ -7,14 +7,14 @@ tags: [ "arch" ]
Clean the cache of old packages in `/var/cachepacman/pkg/`:
```bash
```sh
ls /var/cache/pacman/pkg/ | wc -l
sudo pacman -Sc
ls /var/cache/pacman/pkg/ | wc -l
```
And the same for `yay` (with `-Yc` to remove old dependencies):
```bash
```sh
ls ~/.cache/yay/ | wc -l
yay -Sc
yay -Yc
@@ -27,7 +27,7 @@ If you chance a configuration file, such as `/etc/environment`, and `pacman` wan
Check the new files, then look at the difference between the `pacman` version, and your version.
```bash
```sh
sudo find /etc/ /var/ /usr/ -name "*.pacnew"
diff /etc/pacman.d/mirrorlist*
```
@@ -36,7 +36,7 @@ Either,
- Update the files manually,
```bash
```sh
sudo -e /etc/pacman.d/mirrorlist
sudo rm /etc/pacman.d/mirrorlist.pacnew
```
@@ -46,7 +46,7 @@ Or,
- use a tool like `pacdiff` to view the changes next to each other, and select them with `vim`.
```bash
```sh
sudo pacman -S pacman-contrib
sudo pacdiff
```

View File

@@ -7,13 +7,13 @@ Packages are kept in /var/cache/pacman/pkg.
Delete unused old packages with:
```bash
```sh
sudo pacman -Sc
```
Signatures are handled by the pacman-key, initially set up with:
```bash
```sh
sudo pacman-key --populate archlinux
```
@@ -23,31 +23,31 @@ sudo pacman-key --refresh-keys
If you have usigned keys, you can refresh with:
```bash
```sh
sudo pacman -Sc
```
or
```bash
```sh
sudo pacman -Scc
```
Reset all keys with:
```bash
```sh
sudo rm -r /etc/pacmand.d/gnupg/ && sudo pacman-key --init
```
If you're constantly getting 'everything corrupted, nothing upgraded', try running:
```bash
```sh
sudo pacman -S archlinux-keyring
```
List all orphaned packages:
```bash
```sh
sudo pacman -Qtdq
```

View File

@@ -5,7 +5,7 @@ tags: [ "void" ]
Make the autologin service:
```bash
```sh
cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
```

View File

@@ -7,24 +7,24 @@ To automatically stick the logo onto your background, do these commands in the d
Get the void linux logo from wikipedia
```bash
```sh
wget https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Void_Linux_logo.svg/256px-Void_Linux_logo.svg.png?20170131170632
```
Rename it, and resize it (the standard size is too small for most wallpapers)
```bash
```sh
convert -resize 200% '256px-Void_Linux_logo.svg.png?20170131170632' void-logo.png
```
Download a pretty wallpaper
```bash
```sh
wget http://wallpapercave.com/wp/Wlm9Gv0.jpg
```
Put the void logo on all *jpg and *png images
```bash
```sh
for x in *.jpg
do
composite -compose multiply -gravity Center void-logo.png "$x" "$x"

View File

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

View File

@@ -6,7 +6,7 @@ tags: [ "void" ]
Update all packages with
```bash
```sh
sudo xbps-install -Su
```
@@ -17,7 +17,7 @@ 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:
```bash
```sh
sudo xbps-remove -O
```
@@ -25,19 +25,19 @@ sudo xbps-remove -O
Old Void kernels are left on the boot partition. List them with:
```bash
```sh
vkpurge list
```
Remove one with:
```bash
```sh
vkpurge 2.8.2_4
```
Remove all but the latest with:
```bash
```sh
vkpurge rm all
```
@@ -48,7 +48,7 @@ You can change this number to change the screen brightness.
For an easy utility, install `brightnessctl`.
```bash
```sh
brightnessctl s 10%-
brightnessctl s 10%+
```

View File

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