add language to code snippets

This commit is contained in:
2023-11-30 19:54:31 +01:00
parent 0f333b4496
commit 06e89102b8
4 changed files with 29 additions and 29 deletions

View File

@@ -71,20 +71,20 @@ Once the VM is booted, enter these commands to start the installation. Press ent
{{< admonition type=tip title="Tip: Setting a keyboard layout" open=false >}} {{< admonition type=tip title="Tip: Setting a keyboard layout" open=false >}}
If your keyboard layout isn't US, then you might want to change it. If your keyboard layout isn't US, then you might want to change it.
Run the following command in the terminal of the booted VM: Run the following command in the terminal of the booted VM:
``` ```bash
ls /usr/share/kbd/keymaps/**/*.map.gz > kb.txt ls /usr/share/kbd/keymaps/**/*.map.gz > kb.txt
nano kb.txt nano kb.txt
``` ```
This will spit out a list of keymaps. Then to select an appropriate keymap, press Ctrl + x and type only the last part (after the last slash and without the .map.gz) after `loadkeys `, so for example for the default Swiss keyboard layout: This will spit out a list of keymaps. Then to select an appropriate keymap, press Ctrl + x and type only the last part (after the last slash and without the .map.gz) after `loadkeys `, so for example for the default Swiss keyboard layout:
``` ```bash
loadkeys de_CH-latin1 loadkeys de_CH-latin1
``` ```
{{< /admonition >}} {{< /admonition >}}
``` ```bash
pacman -Sy git pacman -Sy git
git clone https://github.com/simplePCBuilding/arch-dev-vm git clone https://github.com/simplePCBuilding/arch-dev-vm
cd arch-dev-vm cd arch-dev-vm
@@ -102,7 +102,7 @@ A thing you might now want to do is install a so-called AUR-Helper.
{{< admonition type=tip title="Tip: Installing recommended extensions if failed during install" open=false >}} {{< admonition type=tip title="Tip: Installing recommended extensions if failed during install" open=false >}}
To use all my recommended extensions in VSCodium, run the `setup-vscodium.sh` script by opening a terminal and typing the following commands: To use all my recommended extensions in VSCodium, run the `setup-vscodium.sh` script by opening a terminal and typing the following commands:
``` ```bash
cd arch-dev-vm cd arch-dev-vm
./setup-vscodium.sh ./setup-vscodium.sh
``` ```
@@ -111,7 +111,7 @@ cd arch-dev-vm
{{< admonition type=tip title="Tip: Installing an AUR-Helper" open=false >}} {{< admonition type=tip title="Tip: Installing an AUR-Helper" open=false >}}
I personally use YAY (yet another yogurt). You install it by running the following commands in Terminator (press the Windows key and type Terminator): I personally use YAY (yet another yogurt). You install it by running the following commands in Terminator (press the Windows key and type Terminator):
``` ```bash
cd /tmp cd /tmp
git clone https://aur.archlinux.org/yay.git git clone https://aur.archlinux.org/yay.git
cd yay cd yay

View File

@@ -36,7 +36,7 @@ The Package Manager for me is the only way I install software, as I don't like t
{{< admonition type=tip title="Tip: Installing YAY" open=false >}} {{< admonition type=tip title="Tip: Installing YAY" open=false >}}
You install it by running the following commands in Terminator (press the Windows key and type Terminator): You install it by running the following commands in Terminator (press the Windows key and type Terminator):
``` ```bash
cd /tmp cd /tmp
git clone https://aur.archlinux.org/yay.git git clone https://aur.archlinux.org/yay.git
cd yay cd yay
@@ -47,15 +47,15 @@ makepkg -si
Syntactically speaking, their usage is basically the same. You can also update your whole system by just running one single command, which is what I recommend doing before installing new Software to avoid version mismatches. Syntactically speaking, their usage is basically the same. You can also update your whole system by just running one single command, which is what I recommend doing before installing new Software to avoid version mismatches.
### Installing new Software ### Installing new Software
You can install a new package by running either one of the two commands below: You can install a new package by running either one of the two commands below (without the quotes):
``` ```bash
sudo pacman -S [package name here] sudo pacman -S "[package name here]"
yay -S [package name here] yay -S "[package name here]""
``` ```
{{< admonition type=example title="Example: Installing a package" open=false >}} {{< admonition type=example title="Example: Installing a package" open=false >}}
If you wanted to install Firefox, you'd run either one of the two commands: If you wanted to install Firefox, you'd run either one of the two commands:
``` ```bash
sudo pacman -S firefox sudo pacman -S firefox
yay -S firefox yay -S firefox
``` ```
@@ -69,7 +69,7 @@ Additionally, it is always important to always check what you are installing / r
### Updating ### Updating
You can update your whole system by running either one of the two commands below: You can update your whole system by running either one of the two commands below:
``` ```bash
sudo pacman -Syu sudo pacman -Syu
yay -Syu yay -Syu
``` ```
@@ -78,20 +78,20 @@ This will update EVERY package installed on your system, and you will never have
### Removing software ### Removing software
You can install a new package by running either one of the two commands below: You can install a new package by running either one of the two commands below:
``` ```bash
sudo pacman -R [package name here] sudo pacman -R [package name here]
yay -R [package name here] yay -R [package name here]
``` ```
{{< admonition type=example title="Example: Removing a package" open=false >}} {{< admonition type=example title="Example: Removing a package" open=false >}}
If you wanted to uninstall Firefox, you'd run either one of the two commands: If you wanted to uninstall Firefox, you'd run either one of the two commands:
``` ```bash
sudo pacman -R firefox sudo pacman -R firefox
yay -R firefox yay -R firefox
``` ```
If you want to remove all the package's dependencies that are no longer required for the system run: If you want to remove all the package's dependencies that are no longer required for the system run:
``` ```bash
sudo pacman -Rs firefox sudo pacman -Rs firefox
yay -Rs firefox yay -Rs firefox
``` ```

View File

@@ -19,7 +19,7 @@ On Linux, as always, there isn't just one shell. At the time of writing this art
{{< admonition type=tip title="Tip: How to check your current shell" open=false >}} {{< admonition type=tip title="Tip: How to check your current shell" open=false >}}
You can check what your current shell is by typing You can check what your current shell is by typing
``` ```bash
echo $SHELL echo $SHELL
``` ```
@@ -28,7 +28,7 @@ This will spit out the path to the shell. The part behind the last / tells you w
{{< admonition type=tip title="Tip: How to change your shell" open=false >}} {{< admonition type=tip title="Tip: How to change your shell" open=false >}}
You can change your shell by typing You can change your shell by typing
``` ```bash
chsh -s /bin/[shell name here] chsh -s /bin/[shell name here]
``` ```
@@ -47,7 +47,7 @@ Basically every CLI (command line interface) program has so-called *options*, al
{{< admonition type=example title="Example: Command line options for ls" open=false >}} {{< admonition type=example title="Example: Command line options for ls" open=false >}}
This is an example of the usage of flags with the command `ls`. The `-la` option means create a list of all options. The `-l` and `-a` options can be specified separately or grouped as in the example below. Usually, when one has more short arguments, they are chained to have a shorter command. The `--color` option can be used to colour the output. This is the exact command that is executed when you type `ll` if you used the install script This is an example of the usage of flags with the command `ls`. The `-la` option means create a list of all options. The `-l` and `-a` options can be specified separately or grouped as in the example below. Usually, when one has more short arguments, they are chained to have a shorter command. The `--color` option can be used to colour the output. This is the exact command that is executed when you type `ll` if you used the install script
``` ```bash
ls -la --color / ls -la --color /
``` ```
{{< /admonition >}} {{< /admonition >}}
@@ -81,14 +81,14 @@ If you want to know in which folder you currently are, there's the `pwd` command
{{< admonition type=example title="Example: Navigate to your home directory" open=false >}} {{< admonition type=example title="Example: Navigate to your home directory" open=false >}}
You can navigate to your home folder (`~`) with the following command You can navigate to your home folder (`~`) with the following command
``` ```bash
cd ~ cd ~
``` ```
{{< /admonition >}} {{< /admonition >}}
{{< admonition type=example title="Example: Navigate to the root folder" open=false >}} {{< admonition type=example title="Example: Navigate to the root folder" open=false >}}
You can navigate to the root folder (`/`) with the following command You can navigate to the root folder (`/`) with the following command
``` ```bash
cd / cd /
``` ```
{{< /admonition >}} {{< /admonition >}}
@@ -108,21 +108,21 @@ You can use the `mv` or `rename` command to rename directory (=folder) or files.
{{< admonition type=example title="Example: Copying a directory" open=false >}} {{< admonition type=example title="Example: Copying a directory" open=false >}}
Assume you want to *copy* the folder `~/arch-dev-vm` folder with the *cp* command to `~/projects/arch-dev-vm`. Assume you want to *copy* the folder `~/arch-dev-vm` folder with the *cp* command to `~/projects/arch-dev-vm`.
``` ```bash
cp -rv ~/arch-dev-vm ~/projects/arch-dev-vm cp -rv ~/arch-dev-vm ~/projects/arch-dev-vm
``` ```
{{< /admonition >}} {{< /admonition >}}
{{< admonition type=example title="Example: Moving a directory or file" open=false >}} {{< admonition type=example title="Example: Moving a directory or file" open=false >}}
Assume you want to *move* the folder `~/arch-dev-vm` folder with the *mv* command to `~/projects/arch-dev-vm`. Assume you want to *move* the folder `~/arch-dev-vm` folder with the *mv* command to `~/projects/arch-dev-vm`.
``` ```bash
mv -v ~/arch-dev-vm ~/projects/arch-dev-vm mv -v ~/arch-dev-vm ~/projects/arch-dev-vm
``` ```
{{< /admonition >}} {{< /admonition >}}
{{< admonition type=example title="Example: Renaming a directory or file" open=false >}} {{< admonition type=example title="Example: Renaming a directory or file" open=false >}}
Assume you want to *rename* the folder `~/arch-dev-vn` folder with the *mv* command to `~/arch-dev-vm`. Assume you want to *rename* the folder `~/arch-dev-vn` folder with the *mv* command to `~/arch-dev-vm`.
``` ```bash
mv -v ~/arch-dev-vn ~/arch-dev-vm mv -v ~/arch-dev-vn ~/arch-dev-vm
``` ```
{{< /admonition >}} {{< /admonition >}}
@@ -136,21 +136,21 @@ Python has a package manager called `pip`. It can be used to install additional
You can create a new *virtual environment* with the following commands. Make sure you are in the directory you want to create the *venv* (short for *virtual environment*) in. You can create a new *virtual environment* with the following commands. Make sure you are in the directory you want to create the *venv* (short for *virtual environment*) in.
``` ```bash
python -m venv [venv name here] python -m venv [venv name here]
``` ```
If the command returns no output, you have successfully created a virtual environment. Now you need to enable it in this terminal to be able to use it. Just remember, it will be turned off, once you close that terminal. You can also use VSCodium's built in terminal. If the command returns no output, you have successfully created a virtual environment. Now you need to enable it in this terminal to be able to use it. Just remember, it will be turned off, once you close that terminal. You can also use VSCodium's built in terminal.
``` ```bash
source [path to folder you created venv in]/[ venv name here ]/bin/activate.fish source "[path to folder you created venv in]/[ venv name here ]/bin/activate.fish"
``` ```
Omit the `.fish` if you are using another shell than fish. Omit the `.fish` if you are using another shell than fish.
{{< admonition type=example title="Example: Creating a venv and entering it" open=false >}} {{< admonition type=example title="Example: Creating a venv and entering it" open=false >}}
These commands create and activate a python virtual environment called `main` in `~`. These commands create and activate a python virtual environment called `main` in `~`.
``` ```bash
python -m venv main python -m venv main
source ~/main/bin/activate.fish source ~/main/bin/activate.fish
``` ```

View File

@@ -40,12 +40,12 @@ On Linux, you can have as many desktop environments on a single system as you li
You can install a new desktop environment using your package manager. The desktop environments are usually so-called package groups, so you're going to be prompted to select what packages you want to install. You can install a new desktop environment using your package manager. The desktop environments are usually so-called package groups, so you're going to be prompted to select what packages you want to install.
So, for example, if you want to install the `Xfce` desktop environment, you can do this by running: So, for example, if you want to install the `Xfce` desktop environment, you can do this by running:
``` ```bash
yay -S xfce4 yay -S xfce4
``` ```
or if you don't have `yay` or if you don't have `yay`
``` ```bash
sudo pacman -S xfce4 sudo pacman -S xfce4
``` ```