mirror of
https://github.com/sunknudsen/privacy-guides.git
synced 2025-02-23 01:03:59 +00:00
Switched shell blocks to console blocks
This commit is contained in:
parent
dc690cb44e
commit
10e1a544af
@ -570,10 +570,12 @@ Good signature
|
|||||||
|
|
||||||
#### Disable swap
|
#### Disable swap
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
sudo dphys-swapfile swapoff
|
$ sudo dphys-swapfile swapoff
|
||||||
sudo dphys-swapfile uninstall
|
|
||||||
sudo systemctl disable dphys-swapfile.service
|
$ sudo dphys-swapfile uninstall
|
||||||
|
|
||||||
|
$ sudo systemctl disable dphys-swapfile.service
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Remove `dphys-swapfile` `fake-hwclock` and `logrotate`
|
#### Remove `dphys-swapfile` `fake-hwclock` and `logrotate`
|
||||||
@ -584,48 +586,58 @@ sudo apt remove -y --purge dphys-swapfile fake-hwclock logrotate
|
|||||||
|
|
||||||
#### Link `/etc/console-setup` to `/tmp/console-setup`
|
#### Link `/etc/console-setup` to `/tmp/console-setup`
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
sudo mv /etc/console-setup /tmp/console-setup
|
$ sudo mv /etc/console-setup /tmp/console-setup
|
||||||
sudo ln -s /tmp/console-setup /etc/console-setup
|
|
||||||
|
$ sudo ln -s /tmp/console-setup /etc/console-setup
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Link `/etc/resolv.conf` to `/tmp/resolv.conf`
|
#### Link `/etc/resolv.conf` to `/tmp/resolv.conf`
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
sudo mv /etc/resolv.conf /tmp/resolv.conf
|
$ sudo mv /etc/resolv.conf /tmp/resolv.conf
|
||||||
sudo ln -s /tmp/resolv.conf /etc/resolv.conf
|
|
||||||
|
$ sudo ln -s /tmp/resolv.conf /etc/resolv.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Link `/home/pi/.gnupg` to `/tmp/pi/.gnupg`
|
#### Link `/home/pi/.gnupg` to `/tmp/pi/.gnupg`
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
mkdir -m 700 /tmp/pi
|
$ mkdir -m 700 /tmp/pi
|
||||||
mv /home/pi/.gnupg /tmp/pi/.gnupg
|
|
||||||
ln -s /tmp/pi/.gnupg /home/pi/.gnupg
|
$ mv /home/pi/.gnupg /tmp/pi/.gnupg
|
||||||
|
|
||||||
|
$ ln -s /tmp/pi/.gnupg /home/pi/.gnupg
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Enable `tmp.mount` service
|
#### Enable `tmp.mount` service
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
echo -e "D /tmp 1777 root root -\nD /tmp/console-setup 1700 root root -\nD /tmp/pi 1700 pi pi -\nD /tmp/pi/.gnupg 1700 pi pi -\nD /var/tmp 1777 root root -" | sudo tee /etc/tmpfiles.d/tmp.conf
|
$ echo -e "D /tmp 1777 root root -\nD /tmp/console-setup 1700 root root -\nD /tmp/pi 1700 pi pi -\nD /tmp/pi/.gnupg 1700 pi pi -\nD /var/tmp 1777 root root -" | sudo tee /etc/tmpfiles.d/tmp.conf
|
||||||
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/
|
|
||||||
sudo systemctl enable tmp.mount
|
$ sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/
|
||||||
|
|
||||||
|
$ sudo systemctl enable tmp.mount
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Edit `/boot/cmdline.txt`
|
#### Edit `/boot/cmdline.txt`
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
sudo cp /boot/cmdline.txt /boot/cmdline.txt.backup
|
$ sudo cp /boot/cmdline.txt /boot/cmdline.txt.backup
|
||||||
sudo sed -i 's/fsck.repair=yes/fsck.repair=skip/' /boot/cmdline.txt
|
|
||||||
sudo sed -i '$ s/$/ fastboot noswap ro systemd.volatile=state/' /boot/cmdline.txt
|
$ sudo sed -i 's/fsck.repair=yes/fsck.repair=skip/' /boot/cmdline.txt
|
||||||
|
|
||||||
|
$ sudo sed -i '$ s/$/ fastboot noswap ro systemd.volatile=state/' /boot/cmdline.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Edit `/etc/fstab`
|
#### Edit `/etc/fstab`
|
||||||
|
|
||||||
```shell
|
```console
|
||||||
sudo cp /etc/fstab /etc/fstab.backup
|
$ sudo cp /etc/fstab /etc/fstab.backup
|
||||||
sudo sed -i -e 's/vfat\s*defaults\s/vfat defaults,ro/' /etc/fstab
|
|
||||||
sudo sed -i -e 's/ext4\s*defaults,noatime\s/ext4 defaults,noatime,ro,noload/' /etc/fstab
|
$ sudo sed -i -e 's/vfat\s*defaults\s/vfat defaults,ro/' /etc/fstab
|
||||||
|
|
||||||
|
$ sudo sed -i -e 's/ext4\s*defaults,noatime\s/ext4 defaults,noatime,ro,noload/' /etc/fstab
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 20: disable Wi-Fi (if not using ethernet)
|
### Step 20: disable Wi-Fi (if not using ethernet)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user