add language to code snippets
This commit is contained in:
@@ -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 >}}
|
||||
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:
|
||||
```
|
||||
```bash
|
||||
ls /usr/share/kbd/keymaps/**/*.map.gz > 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:
|
||||
```
|
||||
```bash
|
||||
loadkeys de_CH-latin1
|
||||
```
|
||||
|
||||
{{< /admonition >}}
|
||||
|
||||
|
||||
```
|
||||
```bash
|
||||
pacman -Sy git
|
||||
git clone https://github.com/simplePCBuilding/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 >}}
|
||||
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
|
||||
./setup-vscodium.sh
|
||||
```
|
||||
@@ -111,7 +111,7 @@ cd arch-dev-vm
|
||||
{{< 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):
|
||||
|
||||
```
|
||||
```bash
|
||||
cd /tmp
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
cd yay
|
||||
|
@@ -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 >}}
|
||||
You install it by running the following commands in Terminator (press the Windows key and type Terminator):
|
||||
|
||||
```
|
||||
```bash
|
||||
cd /tmp
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
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.
|
||||
|
||||
### Installing new Software
|
||||
You can install a new package by running either one of the two commands below:
|
||||
```
|
||||
sudo pacman -S [package name here]
|
||||
yay -S [package name here]
|
||||
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]"
|
||||
yay -S "[package name here]""
|
||||
```
|
||||
|
||||
{{< 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:
|
||||
```
|
||||
```bash
|
||||
sudo pacman -S firefox
|
||||
yay -S firefox
|
||||
```
|
||||
@@ -69,7 +69,7 @@ Additionally, it is always important to always check what you are installing / r
|
||||
|
||||
### Updating
|
||||
You can update your whole system by running either one of the two commands below:
|
||||
```
|
||||
```bash
|
||||
sudo pacman -Syu
|
||||
yay -Syu
|
||||
```
|
||||
@@ -78,20 +78,20 @@ This will update EVERY package installed on your system, and you will never have
|
||||
|
||||
### Removing software
|
||||
You can install a new package by running either one of the two commands below:
|
||||
```
|
||||
```bash
|
||||
sudo pacman -R [package name here]
|
||||
yay -R [package name here]
|
||||
```
|
||||
|
||||
{{< 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:
|
||||
```
|
||||
```bash
|
||||
sudo pacman -R firefox
|
||||
yay -R firefox
|
||||
```
|
||||
|
||||
If you want to remove all the package's dependencies that are no longer required for the system run:
|
||||
```
|
||||
```bash
|
||||
sudo pacman -Rs firefox
|
||||
yay -Rs firefox
|
||||
```
|
||||
|
@@ -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 >}}
|
||||
You can check what your current shell is by typing
|
||||
```
|
||||
```bash
|
||||
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 >}}
|
||||
You can change your shell by typing
|
||||
```
|
||||
```bash
|
||||
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 >}}
|
||||
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 /
|
||||
```
|
||||
{{< /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 >}}
|
||||
You can navigate to your home folder (`~`) with the following command
|
||||
```
|
||||
```bash
|
||||
cd ~
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition type=example title="Example: Navigate to the root folder" open=false >}}
|
||||
You can navigate to the root folder (`/`) with the following command
|
||||
```
|
||||
```bash
|
||||
cd /
|
||||
```
|
||||
{{< /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 >}}
|
||||
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
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< 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`.
|
||||
```
|
||||
```bash
|
||||
mv -v ~/arch-dev-vm ~/projects/arch-dev-vm
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< 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`.
|
||||
```
|
||||
```bash
|
||||
mv -v ~/arch-dev-vn ~/arch-dev-vm
|
||||
```
|
||||
{{< /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.
|
||||
|
||||
```
|
||||
```bash
|
||||
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.
|
||||
|
||||
```
|
||||
source [path to folder you created venv in]/[ venv name here ]/bin/activate.fish
|
||||
```bash
|
||||
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.
|
||||
|
||||
|
||||
{{< 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 `~`.
|
||||
```
|
||||
```bash
|
||||
python -m venv main
|
||||
source ~/main/bin/activate.fish
|
||||
```
|
||||
|
Reference in New Issue
Block a user