Software

MacBook 2015

Webcam

Anleitung zur Installation der Webcam-Treiber: https://www.xtrasimplicity.com/posts/infrastructure/macbook-pro-121-fedora-automatic-firmware-build-on-kernel-upgrade/

https://www.tobiasheide.de/ubuntu-20-04-lts-auf-macbook-pro-retina-15-ende-2013/ https://github.com/patjak/facetimehd/wiki/Installation#get-started-on-debian

To install all needed tools in debian use the following commands. Get the build utilities for the kernel:

apt-get install -y linux-headers-`uname -r`

Get utilities needed to extract the firmware:

apt install xz-utils curl cpio make

Get dependencies:

apt-get install linux-headers-generic git kmod libssl-dev checkinstall
# Setting up virtualization on Fedora Linux

Source: https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/

First install the corresponding virtualization packages: sudo dnf install @virtualization Start and startup after boot can be enabled like this: sudo systemctl start libvirtd sudo systemctl enable libvirtd Verify if KVM is running now: lsmod | grep kvm

Source: https://developer.fedoraproject.org/tools/virtualization/installing-libvirt-and-virt-install-on-fedora-linux.html

Installing libvirt individually can be done via sudo dnf install libvirt -y This may be needed for the Cockpit Webinterface from Fedora Server.

Source: https://docs.fedoraproject.org/en-US/fedora-server/virtualization/installation/#_finishing_cockpit_machines_configuration

On Fedora Server a Virtual Machine GUI can be used in Cockpit Webinterface. This makes it much easier to set up VMs. The Virtual Machine plugin can be installed in the Applications pane after refreshing the available Applications. In this GUI also the etwork can be adjusted so that a VM has physical LAN connection if needed. This can be done via ‘Direct Attachment’ preferably.

Source: https://forum.manjaro.org/t/cannot-access-storage-file-as-uid-65534-gid-992/58563

It can be helpful to adjust the user and group config of libvirt. This can be needed when there is a problem with permissions to open and adjust VM isos. To do that adjust the user to your target user and group to ‘users’ in the folloing file /etc/libvirt/qemu.conf.

Send PC to sleep for a given time

Source: https://forum.proxmox.com/threads/automatisches-ein-und-ausschalten-des-proxmoxx-servers.79638/

If the hardware supports it a PC or server can be send to sleep for a given time with the following command:

/usr/sbin/rtcwake -m off -s <sleep_time_in_seconds>

This can of course be used as a cronjob if it should be done regularly:

# m h dom mon dow command
30 00 * * * /usr/sbin/rtcwake -m off -s <sleep_time_in_seconds>

Deoending on the system it could be the case that it does not support the off state for RTC startups. This is the case for instance for ARM systems most of the time. Fot those it can work to use different suspend methods like mem or freeze:

rtcwake -m freeze -s <sleep_time_in_seconds>

To find out with suspend methods are supported use:

cat /sys/power/state

Setting CPU power governor

Source: https://helpdesk.schabau.eu/archiv/proxmox006.html

The CPU power governor can be used to set the efficiency / performance target for the CPU of the system. To check in Linux what current target is set use this command:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Available options can be shown with this comand:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

To set a specific mode use a crontab that sets it after boot like this:

# CPU-Powermode
@reboot echo "<mode>" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null 2>&1

To verify the CPU behavior you can check CPU frequencies using this command:

cat /proc/cpuinfo | grep -E 'processor|MHz'

To check C-States you can use turbostat or powertop. To install turbostat on debian use

apt install linux-cpupower

Scan for malware and virus

Source: https://wiki.ubuntuusers.de/ClamAV/

To scan a folder use the following command:

sudo clamscan <your_folder>

To update the database:

sudo freshclam

Removing repository from package manager

Fedora

Source: fedoraproject.org To remove a repository from the package manager navigate to the folder /etc/yum.repos.d/. Within that folder should be a file corresponding to the repository that should be removed. Just remove this file - the repository will then be removed from the package manager.

Set up automatic security updates

To set up automatic securoty updates on a server for instance use the following commands.

Fedora

On Fedora install the following package:

dnf install dnf-automatic

Then edit the file /etc/dnf/automatic.conf with your preferred configuration. But make sure to set upgrade_type to security and apply_updates to yes. Then enable the corresponding service:

systemctl enable --now dnf-automatic.timer

Debian

On Debian install the following package:

apt install unattended-upgrades

Then edit the file /etc/apt/apt.conf.d/50unattended-upgrades with your preferred configuration. You will have to uncomment all packages you want to update automatically. Then enable the corresponding service:

systemctl enable --now unattended-upgrades

Change hostname

To change the hostname of the system use the hostnamectl command:

hostnamectl set-hostname <target_hostname>