diff --git a/7z b/7z index 12decb4e..27113caa 100644 --- a/7z +++ b/7z @@ -1,4 +1,5 @@ --- +syntax: bash tags: [ compression ] --- 7z [Args] [archive.7z] [files / folders to archive] diff --git a/alias b/alias index 76eb813b..b02043f3 100644 --- a/alias +++ b/alias @@ -6,3 +6,9 @@ alias ll='ls -l' # To remove alias: unalias ll + +# Add permanent aliasses +# bash: ~/.bashrc +# fish: ~/.config/fish/config.fish + + diff --git a/balooctl b/balooctl new file mode 100644 index 00000000..827e7df4 --- /dev/null +++ b/balooctl @@ -0,0 +1,17 @@ +--- +tags: [ system ] +--- + +# Control the Baloo file indexer + +# Help: +balooctl -h + +# Deactivate it: +balooctl disable + +# Clean the database +balooctl purge + +# See status +balooctl status diff --git a/copr b/copr new file mode 100644 index 00000000..4edb80a9 --- /dev/null +++ b/copr @@ -0,0 +1,20 @@ +--- +syntax: bash +tags: [ packaging ] +--- +# https://copr.fedorainfracloud.org + +# - - - Workstation - - - + +sudo dnf copr enable / + + +# - - - Immutable variants - - - +# (Silverblue, Kinoite,...) + +# manually: +# go to the site and copy the link to the .repo file fitting your version +wget https://copr.fedorainfracloud.org/coprs///repo/fedora-/reponame.repo -p /etc/yum.repos.d/ + +# automatically: +https://github.com/trytomakeyouprivate/COPR-command diff --git a/gocryptfs b/gocryptfs new file mode 100644 index 00000000..c836ee2c --- /dev/null +++ b/gocryptfs @@ -0,0 +1,10 @@ +--- +tags: [ security ] +syntax: bash +--- + +# Help +gocryptfs -h + +# Long Help +gocryptfs -hh diff --git a/ostree b/ostree new file mode 100644 index 00000000..12c53c37 --- /dev/null +++ b/ostree @@ -0,0 +1,15 @@ +--- +syntax: bash +tags: [ packaging ] +--- +# Fix current system image to not get deleted +sudo ostree admin pin 0 + +# Remove unpinned deployments (versions) +sudo ostree admin cleanup + +# Short info about deployments +sudo ostree admin status + +# Upgrade your system +sudo ostree admin upgrade diff --git a/polkit b/polkit new file mode 100644 index 00000000..f04669bc --- /dev/null +++ b/polkit @@ -0,0 +1,34 @@ +--- +tags: [ security ] +--- + +# Authorization API for unprivileged programs ("Subjects") to access privileged Programs ("Mechanisms") +# polkitd is the system daemon + +# see "man polkit" for details + +# user created rules go to /etc/polkit-1/rules.d/ +# after changing any of the directories all rules are reloaded + +# example rule, allowing users in group "admin" to change users + +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.accounts.user-administration" && + subject.isInGroup("admin")) { + return polkit.Result.YES; + } + }); + +# naming and preferences: +1. Rules in /etc/polkit-1/rules.d/ are favored over /usr/share/polkit-1/rules.d/ +2. Lower numbers in the rule name are favored over higher numbers or no numbers + +# example name: 50-libvirt.rules + +# Polkit rule types: + +addRule() +# whenever a program wants authorization, custom rules can skip that + +addAdminRule() +# Whenever administrator authentification is required diff --git a/rpm-ostree b/rpm-ostree new file mode 100644 index 00000000..e9b6839d --- /dev/null +++ b/rpm-ostree @@ -0,0 +1,62 @@ +--- +syntax: bash +tags: [ packaging ] +--- +# - - - - Infos - - - - - + +# View the current status +rpm-ostree status + +# Short version +ostree admin status + +# - - - - Updating - - - - + +# Upgrade your system +rpm-ostree update + +# Upgrade your system without reboot (not as stable) +rpm-ostree update apply-live + +# Rebase your system image (new version, completely different System) +rpm-ostree rebase : + +# - - - Install and remove apps - - - + +# Update your system and install an app +rpm-ostree update install + +# Install an app without reboot +rpm-ostree install --apply-live + +# Remove a layered app +rpm-ostree update remove + +# Uninstall an app included in the system +rpm-ostree update override --remove + +# Reinstall an app (restore its original state) +rpm-ostree install --allow-inactive + +# - - - - Stop and reverse - - - - + +# Cancel a running process +rpm-ostree cancel + +# Delete currently waiting deployment(s) +rpm-ostree cleanup + +# - - - - Advanced modifications - - - - + +# Add a COPR repo +sudo wget -p /etc/yum.repos.d/ + +# Replace a local package example (HTTP or local file paths, COPR not yet supported) +rpm-ostree update override --replace https://objstore.int.example.com/hotfixes/kernel.rpm + +# Edit Kernel arguments in an Editor +rpm-ostree update kargs --editor + +# Edit kargs if missing +rpm-ostree update kargs --append-if-missing + diff --git a/sddm2rpm b/sddm2rpm new file mode 100644 index 00000000..575eb702 --- /dev/null +++ b/sddm2rpm @@ -0,0 +1,21 @@ +--- +syntax: bash +tags: [ packaging ] +--- +# Converting a SDDM theme into a layerable RPM for Image-based systems +# like Fedora Silverblue/Kinoite or OpenSUSE microOS + +#Usage: +sddm2rpm [OPTIONS] [dest] + +#Arguments: + path to sddm archive + [dest] directory to unpack too + +#Options: + --pkg-version version of package, defaults to 1.0.0 + --license license of package, defaults to GPLv3 + -s, --output-spec output spec file + --url upstream url for rpm + -h, --help Print help + -V, --version Print version diff --git a/selinux b/selinux index 4899f0c1..a31595ee 100644 --- a/selinux +++ b/selinux @@ -2,7 +2,10 @@ tags: [ security ] --- -## selinux standard +## SELinux standard + +# On manual install: activate it (Debian-based) +selinux-activate # To get the status of selinux getenforce @@ -11,7 +14,7 @@ sestatus # or from the file cat /etc/selinux/config -# To set the status to permissive +# To set the status to permissive (best way to deactivate) setenforce 0 # To get the context of files/processes/ports/users diff --git a/sudo b/sudo index 3078d877..777f899b 100644 --- a/sudo +++ b/sudo @@ -1,2 +1,10 @@ +--- +syntax: bash +tags: [ system ] +--- + # Preserve user environment when running command sudo -E + +# Enter root shell (better method than su) +sudo -i