mirror of
https://github.com/tiyn/wiki.git
synced 2025-11-07 05:31:17 +01:00
refactor: using ```sh instead of shell
This commit is contained in:
@@ -7,7 +7,7 @@ To change the hardware clock look at the [according article](./hwclock.md)
|
||||
|
||||
To change the time and date run the following command:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
date
|
||||
```
|
||||
|
||||
@@ -16,14 +16,14 @@ date
|
||||
To change the date run the following command with an adjusted value for the
|
||||
date:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
date +%Y%m%d -s "20210809"
|
||||
```
|
||||
|
||||
To change the time run the following command with an adjusted value for the
|
||||
date:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
date +%T -s "18:49:42"
|
||||
```
|
||||
|
||||
@@ -34,6 +34,6 @@ After that you can check if the time is correct by displaying it.
|
||||
To set your timezone run the following command with the accordingly selected
|
||||
file for your location:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ many audio and video tools and libraries.
|
||||
First you need to create a text file `files.txt` that includes a line for every
|
||||
video you want to concatenate in the form of:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
file '<path to the video>'
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ You have to give the absolute path towards the files.
|
||||
Make sure the videos are in correct order.
|
||||
To concatenate these video files you can run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
ffmpeg -f concat -safe 0 -i files.txt -map 0 -c copy output.mp4
|
||||
```
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
To display the hardware clock run the following command:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
hwclock
|
||||
```
|
||||
|
||||
@@ -14,6 +14,6 @@ hwclock
|
||||
|
||||
To sync the hardware clock run the following command:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
hwclock -w
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ It is a replacement for the program `ifconfig`.
|
||||
|
||||
You can list network interfaces by running:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
ip link list
|
||||
```
|
||||
|
||||
@@ -16,12 +16,12 @@ ip link list
|
||||
|
||||
Assuming the interface is named `wlan0` run the following:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
ip link set wlan0 up
|
||||
```
|
||||
|
||||
Disabling works accordingly by running:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
ip link set wlan0 down
|
||||
```
|
||||
|
||||
@@ -19,7 +19,7 @@ First format the disk so that it has one partition (we will assume its called
|
||||
`/dev/sdc1`).
|
||||
To add the partition to a group run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
pvcreate /dev/sdc1
|
||||
vgextend <name of your volume group> /dev/sdc1
|
||||
```
|
||||
@@ -44,18 +44,18 @@ If you don't have enough space you have to resize the physical volume as
|
||||
described in this article.
|
||||
Then run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
lvextend -L +<size (e.g. 40G)> /dev/<volume groupt>/<logical volume>
|
||||
```
|
||||
|
||||
If you want to allocate all the free space existing in a volume group run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
lvextend -l +100%FREE /dev/<volume group>/<logical volume>
|
||||
```
|
||||
|
||||
Now you need to extend the filesystem with:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
resize2fs /dev/<volume group>/<logical volume>
|
||||
```
|
||||
|
||||
@@ -20,13 +20,13 @@ For further information see [the disk management article](./disk-management.md)
|
||||
SSH into Proxmox.
|
||||
Enlarge a disk by using:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
qm resize <vmid> <vm-disk-to-enlarge> <size>
|
||||
```
|
||||
|
||||
For example if you want to the disk 100 by 100G (100GibiByte):
|
||||
|
||||
```shell
|
||||
```sh
|
||||
qm resize 100 ide0 +100G
|
||||
```
|
||||
|
||||
@@ -47,19 +47,19 @@ Finally extend the filesystem `resize2fs /dev/mapper/pve-root`.
|
||||
|
||||
On the host system find the usb you're looking to pass through with
|
||||
|
||||
```shell
|
||||
```sh
|
||||
lsusb
|
||||
```
|
||||
|
||||
Then assign it to the vm using
|
||||
|
||||
```shell
|
||||
```sh
|
||||
qm set <vm-id> -usb<id-to-set> host=<id-of-the-usb>
|
||||
```
|
||||
|
||||
for example
|
||||
|
||||
```shell
|
||||
```sh
|
||||
qm set 101 -usb0 host=aaaa:8816
|
||||
```
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ To enable easy login without password you can add the contents of the file
|
||||
on the machine you want to log into.
|
||||
You can use the modified command below for ease of use:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
cat ~/.ssh/id_rsa.pub | ssh username@server 'cat >> ~/.ssh/authorized_keys'
|
||||
```
|
||||
|
||||
@@ -30,6 +30,6 @@ To mount a directory (in this case called `directory`) from a remote server
|
||||
(in this case called `server` also can be substituted by something like
|
||||
`user@server-ip`) on a local mount (in this case `mountpoint`) run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
sshfs server:/directory mountpoint
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user