Multiple Sections revised and added.
This commit is contained in:
+22
-111
@@ -1,127 +1,38 @@
|
||||
\section{Icdiff}
|
||||
\begin{justify}
|
||||
Bei dem Programm {\ttfamily icdiff} kann man zwei Dateien vergleichen. Die Ausgabe erfolgt in einer Tabellarischen Form und die Unterschiede werden in Farbe dargestellt.
|
||||
|
||||
\begin{longtable}[l]{p{3cm}p{13cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Typ}} & \multicolumn {1}{l}{\textbf{Erforderliches Programm}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Typ}} & \multicolumn {1}{l}{\textbf{Erforderliches Programm}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
%\multicolumn{2}{r}{{\bfseries \tablename \thetable{} Continued on next page}} \\
|
||||
\multicolumn{2}{r}{{\bfseries Continued on next page}} \\
|
||||
\endfoot
|
||||
\caption{Komprimierung und Archiv} \\
|
||||
\endlastfoot
|
||||
gzip & gzip \\
|
||||
bzip2 & bzip2 \\
|
||||
lzma & lzma oder 7z \\
|
||||
xz & xz oder 7z \\
|
||||
zstd & zstd \\
|
||||
brotli & bro \\
|
||||
lz4 & lz4 \\
|
||||
zlib & pigz oder zlib-flate \\
|
||||
dmg & 7z \\
|
||||
tar & tar, optional archive\verb|_|color für Ausgabe in Farbe \\
|
||||
ar & bsdtar oder ar \\
|
||||
zip & unzip oder bsdtar \\
|
||||
jar & unzip oder bsdtar \\
|
||||
7-zip & 7zz oder 7zr oder 7z oder 7za \\
|
||||
lzip & lzip \\
|
||||
iso & bsdtar oder isoinfo oder 7z \\
|
||||
rpm & rpm2cpio und cpio oder bsdtar \\
|
||||
cab & cabextract oder 7z \\
|
||||
cpio & cpio oder bsdtar oder 7z \\
|
||||
appimage & unsquashfs \\
|
||||
snap & unsquashfs \\
|
||||
\end{longtable}
|
||||
%\newpage
|
||||
Eine Auswahl der Datei Typen.
|
||||
\begin{longtable}[l]{p{3cm}p{13cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Typ}} & \multicolumn {1}{l}{\textbf{Erforderliches Programm}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Typ}} & \multicolumn {1}{l}{\textbf{Erforderliches Programm}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
%\multicolumn{2}{r}{{\bfseries \tablename \thetable{} Continued on next page}} \\
|
||||
\multicolumn{2}{r}{{\bfseries Continued on next page}} \\
|
||||
\endfoot
|
||||
\caption{Datei Typen} \\
|
||||
\endlastfoot
|
||||
nroff(man) & mandoc oder man oder groff \\
|
||||
shared library & nm \\
|
||||
MS Word(doc) & wvText oder catdoc oder Libreoffice \\
|
||||
MS Word(docx) & pandoc oder docx2txt oder Libreoffice \\
|
||||
Powerpoint(ppt) & catppt \\
|
||||
Powerpoint(pptx) & pptx2md oder Libreoffice \\
|
||||
Excel(xls) & in2csv oder xls2csv \\
|
||||
Excel(xlsx) & xlsx2csv(>=0.8.3) oder in2csv oder xlscat oder excel2csv oder Libreoffice \\
|
||||
odt & pandoc oder odt2txt oder Libreoffice \\
|
||||
odp & libreoffice \\
|
||||
ods & xlscat oder Libreodffice \\
|
||||
csv & csvtable oder csvlook oder column oder pandoc \\
|
||||
rtf & unrtf oder Libreoffice \\
|
||||
epub & pandoc \\
|
||||
html, xml & xmg, w3m, lynx, elinks oder html2text \\
|
||||
pdf & pdftotext oder perldoc \\
|
||||
mp3 & ffprobe oder eyeD3 oder id3v2 \\
|
||||
markdown & pandoc
|
||||
java.class & procyon \\
|
||||
binary data & strings \\
|
||||
json & jp \\
|
||||
\end{longtable}
|
||||
Bei dem Programm {\ttfamily icdiff} kann man zwei Dateien vergleichen. Die Ausgabe erfolgt in einer Tabellarischen Form und die Unterschiede werden in Farbe dargestellt. Gelöschte Zeilen werden in {\ttfamily rot}, in {\ttfamily grün} hinzugefügte und in {\ttfamily gelb} die in Konflikt stehen. \\
|
||||
Die Anzeige von Zeilennummern wird mit dem Parameter {\ttfamily --line-numbers} eingeschaltet.
|
||||
%---------------------------------------------------
|
||||
% Subsection: Installation
|
||||
%---------------------------------------------------
|
||||
\subsection{Installation}
|
||||
Für Arch Linux Distributionen kann man das Paket mit dem Paket Manager installieren. Für Debian und deren Derivate kann das Script von der \href{https://lesspipe.org/downloads.html}{Projekt Seite} herunter geladen werden. Nach dem Download die Datei ausführbar machen und in das Verzeichnis {\ttfamily /usr/bin} kopieren.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Installation]
|
||||
uws@tux># Arch Linux
|
||||
uws@tux>sudo pacman -S lesspipe
|
||||
uws@tux>yay -S icfiff
|
||||
|
||||
uws@tux># Debian and other, after download
|
||||
uws@tux>chmod +x lesspipe.sh
|
||||
uws@tux>sudo cp lesspipe.sh /usr/bin
|
||||
uws@tux># Debian and other
|
||||
uws@tux>sudo apt install icdiff
|
||||
|
||||
uws@tux># Python
|
||||
uws@tux>pip install icdiff
|
||||
\end{lstlisting}
|
||||
%---------------------------------------------------
|
||||
% Subsection: Konfiguration
|
||||
% Subsection: Git Konfiguration
|
||||
%---------------------------------------------------
|
||||
\subsection{Konfiguration}
|
||||
Damit {\ttfamily lesspipe} mit less zusammen arbeitet muss die Variable {\ttfamily LESSOPEN} gesetzt werden. Dieses geschieht am besten in der jeweiligen Konfigurationsdatei der Shell, für die Bash in der .bashrc.
|
||||
\subsection{Git Konfiguration}
|
||||
Möchte man das Tool auch in Git integrieren, so fügt man folgende Zeilen in der Datei {\ttfamily .gitconfig} ein.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=LESSOPEN]
|
||||
uws@tux>grep LESS .bashrc
|
||||
export LESSOPEN="|lesspipe.sh %s"
|
||||
\end{lstlisting}
|
||||
%---------------------------------------------------
|
||||
% Subsection: Syntax Highlight
|
||||
%---------------------------------------------------
|
||||
\subsection{Syntax Highlight}
|
||||
Wenn das Programm {\ttfamily nvimpager} installiert ist, so wird dieses für die farbige Ausgabe verwendet. Ist es nicht installiert, werden die Programme {\ttfamily bat/batcat, pygmentize, source-highlight, code2color und vimcolor} ausprobiert. Für {\ttfamily pygmentize} und {\ttfamily bat/batcat} kann eine eingeschränkte Anzahl von Optionen für die Variable {\ttfamily LESSCOLORIZER} hinzugefügt werden.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=LESSCOLORIZER]
|
||||
LESSCOLORIZER='pygmentize -O style=foo'
|
||||
LESSCOLORIZER='bat --style=foo --theme=bar' # --theme=default for default theme
|
||||
\end{lstlisting}
|
||||
Welche Script Sprachen die einzelnen Programme unterstützen, kann man sich folgendermaßen anzeigen lassen.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Script Sprachen]
|
||||
uws@tux>bat --list-languages
|
||||
uws@tux>batcat --list-languages
|
||||
uws@tux>pygmentize -L lexers
|
||||
uws@tux>source-highlight --lang-list
|
||||
uws@tux>code2color -h
|
||||
uws@tux>vimcolor -L
|
||||
\begin{lstlisting}[captionpos=b, caption=Git Konfiguration]
|
||||
[diff]
|
||||
tool = icdiff
|
||||
[difftool "icdiff"]
|
||||
cmd icdiff --line-numbers \"$LOCAL\" \"$REMOTE\"
|
||||
\end{lstlisting}
|
||||
\newpage
|
||||
%-- Include Picture
|
||||
\begin{center}
|
||||
\includegraphics[scale=0.6]{Pictures/Icdiff.png}
|
||||
\end{center}
|
||||
|
||||
\end{justify}
|
||||
|
||||
+3
-1
@@ -18,4 +18,6 @@
|
||||
\input{Kapitel12/AsciiArt}
|
||||
\input{Kapitel12/CodeOSS}
|
||||
\newpage
|
||||
\input{Kapitel12/Lesspipe}
|
||||
\input{Kapitel12/Lesspipe}
|
||||
\newpage
|
||||
\input{Kapitel12/Icdiff}
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
\chapter{KI}
|
||||
%-------------------------------------------
|
||||
% load other documents
|
||||
%------------------------------------------
|
||||
\input{Kapitel16/Ollama}
|
||||
Executable
+113
@@ -0,0 +1,113 @@
|
||||
\section{Ollama}
|
||||
\begin{justify}
|
||||
Mit dem Programm Ollama kann man LLMs (Large Language Model) lokal auf einem Rechner ausführen. Es wird kein Online Zugang zu einem LLM benötigt.
|
||||
|
||||
Die Hashfunktion Argon2 wurde speziel entwickelt, um den Einsatz von speziel entwickelter Hardware (ASICs) zu erschweren. Argon2 ist ein großartiger speicherharter Passwort-Hashing-Algorithmus, der sich gut für die Offline-Schlüsselableitung eignet. \\
|
||||
Es gibt verschiede Arten von Argon2.
|
||||
\begin{itemize}
|
||||
\item Argon2d - Bietet eine starke GPU-Resistenz, hat aber potenzielle Seitenkanalangriffe (in sehr speziellen Situationen möglich).
|
||||
\item Argon2i - Bietet weniger GPU-Widerstand, hat aber keine Seitenkanalangriffe
|
||||
\item Argon2id - empfohlen (kombiniert Argon2d und Argon2i) ist aber ressourcenintensive
|
||||
\end{itemize}
|
||||
Folgende Parameter gibt es in Argon2.
|
||||
\begin{longtable}[l]{p{3cm}p{12cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Parameter}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Parameter}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
%\multicolumn{2}{r}{{\bfseries \tablename \thetable{} Continued on next page}} \\
|
||||
\multicolumn{2}{r}{{\bfseries Continued on next page}} \\
|
||||
\endfoot
|
||||
\caption{Argon2 Parameter} \\
|
||||
\endlastfoot
|
||||
salt & Salt Wert, mindestens 8 Zeichen lang\\
|
||||
\verb|-|i & Verwendet Argon2i, default\\
|
||||
\verb|-|d & Verwendet Argon2d\\
|
||||
\verb|-|id & Verwendet Argon2id\\
|
||||
\verb|-|t N & etzt die Anzahl der Iteration auf N, Default ist 3\\
|
||||
\verb|-|m N & Legt die Speichernutzung von 2^N Kib fest, default ist 12\\
|
||||
\verb|-|k N & Legt die Speichernutzung von N Kib fest, default ist 4096\\
|
||||
\verb|-|p N & Anzahl der Parallelen Threads, default ist 1\\
|
||||
\verb|-|l & Setzt die Hash-Ausgabenlänge auf N Bytes, default ist 32\\
|
||||
\verb|-|e & Nur kodierten Hash ausgeben\\
|
||||
\verb|-|r & Gibt nur die RAW Bytes des Hashs aus\\
|
||||
\verb|-|v (10/13) & Angabe der Argon2 Version, default ist 13\\
|
||||
\end{longtable}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Installation
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Installation}
|
||||
Unter Arch Linux kann man das Programm aus dem Repository installieren.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Installation]
|
||||
uws@tux>sudo pacman -S argon2
|
||||
|
||||
uws@tux># Debian
|
||||
uws@tux>sudo apt install -y argon2
|
||||
\end{lstlisting}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Beispiele
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Beispiele}
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Beispiele]
|
||||
uws@tux>echo "Password" | argon2 "SaltText"
|
||||
Type: Argon2i
|
||||
Iterations: 3
|
||||
Memory: 4096 KiB
|
||||
parallelism: 1
|
||||
Hash: 839a5d77fid....
|
||||
Encode: $argon2i$v=19$m=4096,t=3,p=1$U2FsdFR....
|
||||
0.015 seconds
|
||||
Verification on
|
||||
|
||||
uws@tux>echo "Password" | Argon2 "SaltText" -d
|
||||
Type: Argon2d
|
||||
Iterations: 3
|
||||
Memory: 4096 KiB
|
||||
parallelism: 1
|
||||
Hash: a9733ec614ef9d....
|
||||
Encode: $argon2d$v=19$m=4096,t=3,p=1$U2FsdFR....
|
||||
0.014 seconds
|
||||
Verification on
|
||||
|
||||
uws@tux># Anzeigen des Ausgabe-Hashs ohne zusätzliche Informationen
|
||||
uwd@tux>echo "Password" | Argon2 "SaltText" -e
|
||||
$argon2id$v=19$m=65536,t=2,p=1$...
|
||||
|
||||
uws@tux># Berechnen Sie einen Hash mit den Parametern für die angegebene Iteration [t]imes, [m]emory usage und [p]arallelism.
|
||||
uws@tux>echo "Passworrd" | argon2 "Salt" -t 5 -m 20 -p 7
|
||||
\end{lstlisting}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Python Beispiel
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Python Beispiel}
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Python]
|
||||
import argon2, binascii
|
||||
|
||||
hash = argon2.hash_password_raw(
|
||||
time_cost=16, memory_cost=2**15, parallelism=2, hash_len=32,
|
||||
password=b'password', salt=b'some salt', type=argon2.low_level.Type.ID)
|
||||
print("Argon2 raw hash:", binascii.hexlify(hash))
|
||||
|
||||
argon2Hasher = argon2.PasswordHasher(
|
||||
time_cost=16, memory_cost=2**15, parallelism=2, hash_len=32, salt_len=16)
|
||||
hash = argon2Hasher.hash("password")
|
||||
print("Argon2 hash (random salt):", hash)
|
||||
|
||||
verifyValid = argon2Hasher.verify(hash, "password")
|
||||
print("Argon2 verify (correct password):", verifyValid)
|
||||
|
||||
try:
|
||||
argon2Hasher.verify(hash, "wrong123")
|
||||
except:
|
||||
print("Argon2 verify (incorrect password):", False)
|
||||
\end{lstlisting}
|
||||
\end{justify}
|
||||
@@ -21,6 +21,7 @@ Folgende File Attribute gibt es.
|
||||
\endfoot
|
||||
\caption{File Attribute} \\
|
||||
\endlastfoot
|
||||
- & Reguläre Datei\\
|
||||
d & Directory\\
|
||||
l & Symbolic Link\\
|
||||
p & FIFO (Named Pipe)\\
|
||||
|
||||
+66
-14
@@ -102,26 +102,35 @@ uws@tux>sudo apt istall screen -y
|
||||
uws@tux># Screen session starten
|
||||
uws@tux>sudo screen -S dist-upgrade
|
||||
|
||||
uws@tux># 1. Als erstes wird das aktuelle System aktualisiert
|
||||
uws@tux>sudo apt update && sudo apt upgrade
|
||||
root@tux># 1. Als erstes wird das aktuelle System aktualisiert
|
||||
root@tux>apt update && apt upgrade
|
||||
|
||||
uws@tux># 2. Ein Neustart des Systems
|
||||
uws@tux>sudo reboot now
|
||||
root@tux># 2. Ein Neustart des Systems
|
||||
root@tux>reboot now
|
||||
\end{lstlisting}
|
||||
\newpage
|
||||
\end{justify}
|
||||
\begin{justify}
|
||||
Nach dem Rebbot sind dann folgende Tätigkeiten auszuführen.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Upgrade Distribution]
|
||||
uws@tux># 3. Screen session starten
|
||||
uws@tux>sudo screen -S dist-upgrade
|
||||
|
||||
uws@tux># 3. Edit source.list. Austausch bullseye durch bookworm
|
||||
uws@tux>sudoedit /etc/apt/source.list
|
||||
root@tux># 4. Edit source.list. Austausch bullseye durch bookworm
|
||||
root@tux>nano /etc/apt/source.list
|
||||
|
||||
uws@tux># 4. Nun kann ein Update gemacht werden
|
||||
uws@tux>sudo apt update
|
||||
root@tux># 5. Nun kann ein Update gemacht werden
|
||||
root@tux>sudo apt update
|
||||
|
||||
uws@tux># 5. Teil-Upgrade des Systems
|
||||
uws@tux>suso apt upgrade --without-new-pkgs
|
||||
root@tux># 6. Teil-Upgrade des Systems
|
||||
root@tux>apt upgrade --without-new-pkgs
|
||||
|
||||
uws@tux># 6. Voll Upgrade
|
||||
uws@tux>sudo apt full-upgrade
|
||||
root@tux># 7. Voll Upgrade
|
||||
root@tux>apt full-upgrade
|
||||
|
||||
uws@tux># 7. Zum Abschluss ein Neustart
|
||||
uws@tux>sudo reboot now
|
||||
root@tux># 8. Zum Abschluss ein Neustart
|
||||
root@tux>reboot now
|
||||
|
||||
uws@tux># 8. Nacharbeiten nach dem reboot
|
||||
uws@tux>sudo apt autoremove
|
||||
@@ -130,4 +139,47 @@ uws@tux>sudo apt purge '?obsolete'
|
||||
uws@tux>sudo apt list '?config-files'
|
||||
uws@tux>sudo apt purge '?config-files'
|
||||
\end{lstlisting}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Upgrade von .list nach .sources
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Upgrade von .list nach .sources}
|
||||
Ab der Version 13 (Trixie) wird ein neues Format für die List Dateien verwendet. Nach einem Upgrade auf die Version 13 kann man automatisch eine Umstellung auf das neue Format machen.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Upgrade list Dateien]
|
||||
uws@tux># Vorher
|
||||
uws@tux>cat /etc/apt/sources.list
|
||||
deb http://ftp.de.debian.org/debian trixie main contrib
|
||||
|
||||
deb http://ftp.de.debian.org/debian trixie-updates main contrib
|
||||
|
||||
# security updates
|
||||
deb http://security.debian.org trixie-security main contrib
|
||||
|
||||
deb http://download.proxmox.com/debian/pve trixie pve-no-subscription
|
||||
|
||||
uws@tux>sudo apt modernize-sources
|
||||
|
||||
uws@tux># Nachher
|
||||
uws@tux>cat /etc/apt/source.list.d/debian.sources
|
||||
Modernized from /etc/apt/sources.list
|
||||
Types: deb
|
||||
URIs: http://ftp.de.debian.org/debian/
|
||||
Suites: trixie
|
||||
Components: main contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
# Modernized from /etc/apt/sources.list
|
||||
Types: deb
|
||||
URIs: http://ftp.de.debian.org/debian/
|
||||
Suites: trixie-updates
|
||||
Components: main contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
# Modernized from /etc/apt/sources.list
|
||||
Types: deb
|
||||
URIs: http://security.debian.org/
|
||||
Suites: trixie-security
|
||||
Components: main contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
\end{lstlisting}
|
||||
\end{justify}
|
||||
|
||||
+37
-1
@@ -142,6 +142,38 @@ Build directory: /home/uws/.cache/yay
|
||||
removing AUR packages from cache ...
|
||||
\end{lstlisting}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Pacman Keys
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Pacman Keys}
|
||||
Mit {\ttfamily Pacman-key} ermöglicht dem Nutzer, die Liste vertrauenswürdiger Schlüssel zu verwalten. Einige Optionen des Befehls {\ttfamily pacman-key} befinden sich in der nachfolgenden Tabelle.
|
||||
\begin{longtable}[l]{p{4cm}p{11cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Option}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Option}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
%\multicolumn{2}{r}{{\bfseries \tablename \thetable{} Continued on next page}} \\
|
||||
\multicolumn{2}{r}{{\bfseries Continued on next page}} \\
|
||||
\endfoot
|
||||
\caption{Pacman Befehle} \\
|
||||
\endlastfoot
|
||||
\verb|--|init & Ein Schlüsselbund für Pacman wird erstellt. Muss nur ausgeführt werden, wenn das Verzeichnis gnupg umbenannt wurde um es neu zu erstellen.\\
|
||||
\verb|--|populate archlinux & Die Entwickler-Schlüssel werden in dem eigenen Schlüsselbund geladen. Wird z.B. Manjaro verwendet, so muss dieses mit angegeben werden.\\
|
||||
\verb|--|refresh-keys & Mit dieser Eingabe werden von allen Schlüsseln, die lokal vorliegen, ein Update angefordert.\\
|
||||
\end{longtable}
|
||||
\begin{justify}
|
||||
In den folgenden Verzeichnissen werden die Schlüssel und die Konfiguration verwaltet.
|
||||
\end{justify}
|
||||
\begin{itemize}
|
||||
\item /usr/share/pacman/keyrings - Ablage der Schlüssel
|
||||
\item /etc/pacman.d/gnupg - Gnupg Konfiguration
|
||||
\end{itemize}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Solutions
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Solutions}
|
||||
@@ -167,6 +199,7 @@ uws@tux>sudo pacman-key --init
|
||||
uws@tux>sudo pacman-key --populate archlinux manjaro
|
||||
uws@tux>sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
|
||||
\end{lstlisting}
|
||||
Wir die Distribution EndeavourOS verwendet, so gibt man anstelle von manjaro endeavouros ein.
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsubsection{jre-openjdk und jre-openjdk-headless stehen in Konflikt}
|
||||
Damit man diesen Konflikt lösen kann, muss man jdk-openjdk neu installieren.
|
||||
@@ -197,6 +230,9 @@ uws@tux>sudo pacman -Q linux-firmware
|
||||
|
||||
uws@tux># Löschen
|
||||
uws@tux>sudo pacman -Rns linux-firmware
|
||||
|
||||
uws@tux># Nach dem Systemupdate linux-firmware installieren
|
||||
uws@tux>sudo pacman -S linux-firmware
|
||||
\end{lstlisting}
|
||||
\newpage
|
||||
%-------------------------------------------------------------------------------
|
||||
@@ -211,7 +247,7 @@ In der nachfolgenden Tabelle sind einige der wichtigsten Befehle aufgelistet. Di
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{befehl}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Befehl}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
|
||||
+92
-60
@@ -4,32 +4,11 @@
|
||||
F"ur das Anzeigen der Netzwerk Auslastung gibt es das Programm {\ttfamily iptraf},
|
||||
das man nachtr"aglich installieren muss.
|
||||
%-------------------------------------------------------------------------------
|
||||
% Section: Performance
|
||||
% Subsection: Performance
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsection{Performance}
|
||||
Mit dem Programm {\ttfamily iperf} kann man die Netzwerk Performance messen. Auf einem Rechner wird das Programm als Server gestartet und von dem anderen Client aus wird dann die Performance gemessen. Ebenso gibt es das Programm {\ttfamily netperf} f"ur die Performance Messung. Beide Programme muss man gegebenen falls nach installieren.\\
|
||||
Als erstes starten wir den Server.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Server start, label=lst:bash]
|
||||
uws@tux>iperf -s
|
||||
--------------------------------------------------
|
||||
Server listing on TCP port 5001
|
||||
TCP window size: 85.3 kByte (default)
|
||||
--------------------------------------------------
|
||||
\end{lstlisting}
|
||||
Von den anderen Client starten wir die Performance Messung.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Client start, label=lst:bash]
|
||||
uws@tux1>iperf -c tux
|
||||
--------------------------------------------------
|
||||
Client connection to tux, TCP port 5001
|
||||
TCP window size: 16.0 kByte (default)
|
||||
--------------------------------------------------
|
||||
|
||||
uws@tux># Aufruf mit Optionen
|
||||
uws@tux>iperf -c tux -w 512k -l 512k -p 5001
|
||||
\end{lstlisting}
|
||||
In der nachfolgenden Tabelle sind einige Optionen f"ur iperf und auch iperf3 aufgelistet.
|
||||
Mit dem Programm {\ttfamily iperf3} kann man die Netzwerk Performance messen. Auf einem Rechner wird das Programm als Server gestartet und von dem anderen Client aus wird dann die Performance gemessen. \\
|
||||
In der nachfolgenden Tabelle sind einige Optionen f"ur iperf3 aufgelistet.
|
||||
\begin{longtable}[l]{p{4cm}p{12cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Option}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
@@ -44,51 +23,104 @@ In der nachfolgenden Tabelle sind einige Optionen f"ur iperf und auch iperf3 auf
|
||||
\endfoot
|
||||
\caption{Optionen Iperf/iperf3} \\
|
||||
\endlastfoot
|
||||
\verb|-|p & Port Angabe\\
|
||||
\verb|-|d, \verb|--|dualtest & Bidrectional Test\\
|
||||
\verb|-|c. \verb|--|client <host> & Run Client Mode, connect to Host\\
|
||||
\verb|-|s & Run Server Mode\\
|
||||
\verb|-|w, \verb|--|windows \verb|[k][m]| & TCP Window size\\
|
||||
\verb|-|l, \verb|--|len \verb|[k][m]| & Length of Buffer to read/write default 8k\\
|
||||
\verb|-|D & Ausführung als Dienst im Hintergrund\\
|
||||
\verb|-|p & Port Angabe, Server und Client\\
|
||||
\verb|-|c & Run Client Mode, connect to Iperf3-Server\\
|
||||
\verb|--|bidir & Bidrectional Test, Client-Server und Server-Client\\
|
||||
\verb|-|w \verb|[k][m][g][t]| & TCP Window size, Kbits, Mbits, Gbits, Tbits. Für Byte erfolgt die Angabe in Großbuchstaben.\\
|
||||
\verb|-|l \verb|[k][m][g][t]| & Length of Buffer to read/write default 8k\\
|
||||
\verb|-|P Wert & Legt die Anzahl der parallel auszuführenden Client-Streams fest.\\
|
||||
\verb|-|f \verb|[k][m][g][t][K][M][G][T]| & Welche Einheiten angezeigt werden. Standard ist M.\\
|
||||
\verb|-|t Sekunden & Gibt die Dauer des Tests an. Die Voreinstellung ist 10 s.\\
|
||||
\verb|-|v & Es wird iPerf3 mitgeteilt, dass die IP\verb|_|DES\verb|_|SERVERS eine IPv6-Adresse ist.\\
|
||||
\verb|-|J & Ausgabe im Json-Format für eine Weiterverarbeitung\\
|
||||
\verb|-|u & UDP anstatt TCP verwenden\\
|
||||
\end{longtable}
|
||||
%-------------------------------------------------------------------------------
|
||||
% Subsubsection: Installation
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsubsection{Installation}
|
||||
Das Programm Iperf3 kann über den jeweiligen Paketmanager installiert werden.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Installation]
|
||||
uws@tux># Arch Linux
|
||||
uws@tux>sudo pacman -S iperf3
|
||||
|
||||
uws@tux># Debian
|
||||
uws@tux>sudo apt install iperf3 -y
|
||||
|
||||
uws@tux># Alma Linux
|
||||
uws@tux>sudo yum install iperf3 -y
|
||||
\end{lstlisting}
|
||||
\newpage
|
||||
%-------------------------------------------------------------------------------
|
||||
% Subsubsection: Server
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsubsection{Server}
|
||||
Den Server-Modus kann man mit dem Aufruf {\ttfamily iperf3 -s} erledigen. Man kann auch den {\ttfamily iperf3} Dienst starten.
|
||||
Als erstes starten wir den Server mit dem Iperf3 Aufruf. Mit {\ttfamily -p} kann man einen anderen Port definieren. Mit Strg-c wird der Server gestoppt.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Server Start]
|
||||
uws@tux>iperf3 -s
|
||||
-----------------------------------------------------------
|
||||
Server listening on 5201 (test #1)
|
||||
-----------------------------------------------------------
|
||||
\end{lstlisting}
|
||||
\begin{justify}
|
||||
Der Nachfolger von iperf ist iperf3.
|
||||
Den {\ttfamily iperf3} Dienst kann man mit {\ttfamily systemctl} starten. Nach dem Starten des Dienstes hört der Server auf den Standard-Port 5201.
|
||||
\end{justify}
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Iperf3 Server start]
|
||||
uws@tux1>iperf3 -s
|
||||
--------------------------------------------------
|
||||
Server listing on TCP port 5201
|
||||
--------------------------------------------------
|
||||
Accepted connection from 10.81.10.18, port 59060
|
||||
[ 5] Local 10.81.10.126, port 5201 connected to 10.81.10.18 port 5902
|
||||
[ ID] Interval Transfer Bitrate
|
||||
[ 5] 0.00 - 1.00 11.2 MBytes 93.9 Mbits/sec
|
||||
[ 5] 1.00 - 2.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 2.00 - 3.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 3.00 - 4.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 4.00 - 5.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 5.00 - 6.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 6.00 - 7.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 7.00 - 8.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 8.00 - 9.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 9.00 - 10.00 11.2 MBytes 93.9 Nbit/sec
|
||||
[ 5] 10.00 - 10.00 24.0 KBytes 91.9 Nbit/sec
|
||||
--------------------------------------------------
|
||||
[ ID] Interval Transfer Bitrate
|
||||
[ 5] 0.00 - 10.00 112 MBytes 93.9 Mbits/sec
|
||||
--------------------------------------------------
|
||||
Server listing on TCP port 5201
|
||||
--------------------------------------------------
|
||||
\begin{lstlisting}[captionpos=b, caption=Dienst Start]
|
||||
uws@tux>sudo systemctl enable iperf3.service --now
|
||||
[sudo] Passwort für uws:
|
||||
Created symlink '/etc/systemd/system/multi-user.target.wants/iperf3.service' → '/usr/lib/systemd/system/iperf3.service'.
|
||||
|
||||
uws@tux>sudo systemctl status iperf3.service
|
||||
● iperf3.service - iperf3
|
||||
Loaded: loaded (/usr/lib/systemd/system/iperf3.service; enabled; preset: disabled)
|
||||
Active: active (running) since Mon 2026-04-13 17:44:26 CEST; 48s ago
|
||||
Invocation: 37d40bd2f6f84fd7a2dd86abf3968acd
|
||||
Main PID: 852030 (iperf3)
|
||||
Tasks: 1 (limit: 38204)
|
||||
Memory: 820K (peak: 1.9M)
|
||||
CPU: 10ms
|
||||
CGroup: /system.slice/iperf3.service
|
||||
└─852030 /usr/bin/iperf3 -s
|
||||
|
||||
Apr 13 17:44:26 pcgo130 systemd[1]: Started iperf3.
|
||||
\end{lstlisting}
|
||||
Und auf dem Client starten wir die Messung erstmal ohne Optionen.
|
||||
\newpage
|
||||
%-------------------------------------------------------------------------------
|
||||
% Subsubsection: Client
|
||||
%-------------------------------------------------------------------------------
|
||||
\subsubsection{Client}
|
||||
Von den anderen Client starten wir die Performance Messung.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Iperf3 Client start]
|
||||
\begin{lstlisting}[captionpos=b, caption=Client Start]
|
||||
uws@tux1>iperf3 -c 10.81.10.126
|
||||
--------------------------------------------------
|
||||
Client connection to 10.81.10.18, TCP port 5201
|
||||
--------------------------------------------------
|
||||
Connecting to host 10.81.10.126, port 5201
|
||||
[ 5] local 10.81.10.185 port 48944 connected to 10.81.10.126 port 5201
|
||||
[ ID] Interval Transfer Bitrate Retr Cwnd
|
||||
[ 5] 0.00-1.00 sec 93.9 MBytes 787 Mbits/sec 90 641 KBytes
|
||||
[ 5] 1.00-2.00 sec 89.0 MBytes 747 Mbits/sec 45 550 KBytes
|
||||
[ 5] 2.00-3.00 sec 89.2 MBytes 749 Mbits/sec 45 508 KBytes
|
||||
[ 5] 3.00-4.00 sec 88.9 MBytes 746 Mbits/sec 0 591 KBytes
|
||||
[ 5] 4.00-5.00 sec 88.6 MBytes 743 Mbits/sec 45 543 KBytes
|
||||
[ 5] 5.00-6.00 sec 89.2 MBytes 749 Mbits/sec 45 462 KBytes
|
||||
[ 5] 6.00-7.00 sec 90.1 MBytes 756 Mbits/sec 0 597 KBytes
|
||||
[ 5] 7.00-8.00 sec 89.9 MBytes 754 Mbits/sec 45 546 KBytes
|
||||
[ 5] 8.00-9.00 sec 89.0 MBytes 747 Mbits/sec 0 658 KBytes
|
||||
[ 5] 9.00-10.00 sec 88.1 MBytes 739 Mbits/sec 45 574 KBytes
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ ID] Interval Transfer Bitrate Retr
|
||||
[ 5] 0.00-10.00 sec 896 MBytes 752 Mbits/sec 360 sender
|
||||
[ 5] 0.00-10.00 sec 893 MBytes 749 Mbits/sec receiver
|
||||
|
||||
iperf Done.
|
||||
|
||||
uws@tux># Aufruf mit Optionen
|
||||
uws@tux>iperf3 -c 10.81.10.126 -w 512k -l 512k -p 5001
|
||||
\end{lstlisting}
|
||||
\newpage
|
||||
%-------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
\input{Kapitel8/JavaInstall}
|
||||
\newpage
|
||||
\input{Kapitel8/Grub}
|
||||
\newpage
|
||||
\input{Kapitel8/SystemVariablen}
|
||||
%----------------------------------------
|
||||
% New Chapter
|
||||
%----------------------------------------
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ Folgende Alias Typen gibt es:
|
||||
\item User\_Alias Benutzerliste
|
||||
\item Runas\_Alias Zielbenutzerliste
|
||||
\item Host\_Alias Hostnameliste
|
||||
\item Cmnd\_Aliad Befehlsliste
|
||||
\item Cmnd\_Alias Befehlsliste
|
||||
\item was
|
||||
\end{itemize}
|
||||
\listBash
|
||||
|
||||
@@ -22,7 +22,7 @@ In der nachfolgenden Tabelle stehen die Parameter und welche Informationen sie a
|
||||
\caption{Parameter}
|
||||
\end{table}
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Hinweistext, label=lst:bash]
|
||||
\begin{lstlisting}[captionpos=b, caption=Hinweistext]
|
||||
uws@tux>uname -s
|
||||
Linux
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
\section{System und Shell Variablen}
|
||||
\begin{justify}
|
||||
System Variablen sind in allen SubShell vorhanden und Shell Variablen nur in der jeweiligen Session. Eine Variable wird mit {\ttfamily var1=text} definiert und bei einer System Variable wird ein {\ttfamily export} vor dem Variablen Namen gesetzt.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Beispiel SubShell]
|
||||
uws@tux>MyVar=Hallo
|
||||
uws@tux>echo $MyVar
|
||||
Hallo
|
||||
|
||||
uws@tux>bash
|
||||
uws@tux>echo $MyVar
|
||||
uws@tux>
|
||||
|
||||
uws@tux>export MyVar1=Hello
|
||||
uws@tux>echo $MyVar1
|
||||
Hello
|
||||
|
||||
uws@tux>bash
|
||||
uws@tux>echo $MyVar1
|
||||
Hello
|
||||
\end{lstlisting}
|
||||
Die System Variablen kann man mit {\ttfamily env} oder {\ttfamily printenv} sich anzeigen lassen. Die Shell Variablen und auch die System Variablen können mit {\ttfamily set} angezeigt werden. Gibt man bei {\ttfamily env} oder [\ttfamily printenv] einen Variablen Namen mit an, so wird nur dierser ausgegeben.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Anzeige Variablen]
|
||||
uws@tux>env | sort | head -n 3
|
||||
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
||||
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
|
||||
DESKTOP_SESSION=plasma
|
||||
|
||||
uws@tux>printenv EDITOR
|
||||
vim
|
||||
|
||||
uws@tux>set | head -n 3
|
||||
BASH=/bin/bash
|
||||
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:globasciiranges:globskipdots:histappend:histreedit:histverify:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
BASHRCSOURCED=Y
|
||||
|
||||
uws@tux>set | grep DESKTOP_SESSION
|
||||
DESKTOP_SESSION=plasma
|
||||
\end{lstlisting}
|
||||
Hier eine Auswahl von System Variablen.
|
||||
\begin{longtable}[l]{p{3cm}p{13cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Variable}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Variable}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
%\multicolumn{2}{r}{{\bfseries \tablename \thetable{} Continued on next page}} \\
|
||||
\multicolumn{2}{r}{{\bfseries Continued on next page}} \\
|
||||
\endfoot
|
||||
\caption{System Variablen} \\
|
||||
\endlastfoot
|
||||
SHELL & Anzeige der verwendeten Shell \\
|
||||
USER & Name des angemeldeten User \\
|
||||
PWD & Das aktuelle Arbeitsverzeichnis \\
|
||||
OLDPWD & Das vorherige Arbeitsverzeichnis \\
|
||||
LANG & Spracheinstellung \\
|
||||
HOME & Home Verzeichnis des Users \\
|
||||
\verb|_| & Der zuletzt ausgeführte Befehl \\
|
||||
\end{longtable}
|
||||
Nun eine Auswahl an Shell Variablen.
|
||||
\begin{longtable}[l]{p{3cm}p{13cm}}
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Variable}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endfirsthead
|
||||
%\multicolumn{2}{c}{{\bfseries \tablename \thetable{} continued from previous page.}} \\
|
||||
\multicolumn{2}{r}{{\bfseries continued from previous page.}} \\
|
||||
\rowcolor{hellgrau}\multicolumn{1}{l}{\textbf{Variable}} & \multicolumn {1}{l}{\textbf{Beschreibung}} \\
|
||||
\hline
|
||||
\hline
|
||||
\endhead
|
||||
%\multicolumn{2}{r}{{\bfseries \tablename \thetable{} Continued on next page}} \\
|
||||
\multicolumn{2}{r}{{\bfseries Continued on next page}} \\
|
||||
\endfoot
|
||||
\caption{Shell Variablen} \\
|
||||
\endlastfoot
|
||||
BASHOPTS & Die Liste der Optionen, die bei der Ausführung von bash verwendet wurden \\
|
||||
BASH\verb|_|VERSION & Version der Bash \\
|
||||
COLUMN & Die Anzahl der Spalten in der Breite, die zur Darstellung der Ausgabe auf dem Bildschirm verwendet werden. \\
|
||||
HOSTNAME & Name des Computers \\
|
||||
IFS & Feldtrenner \\
|
||||
PS1 & Standard Prompt definition \\
|
||||
PS2 & Sekundäre Eingabeaufforderungen werden angezeigt, wenn ein Befehl sich über mehrere Zeilen erstreckt. \\
|
||||
UID & Die User ID des Users \\
|
||||
\end{longtable}
|
||||
%---------------------------------------------------
|
||||
% Subsection: PROMPT_COMMAND
|
||||
%---------------------------------------------------
|
||||
\subsection{PROMPT\_COMMAND}
|
||||
Die Variable {\ttfamily PROMPT\verb|_|COMMAND} wird vor jeder Anzeige des Prompts ausgeführt.
|
||||
\listBash
|
||||
\begin{lstlisting}[captionpos=b, caption=Beispiel]
|
||||
uws@tux>grep PROMPT .bashrc
|
||||
PROMPT_COMMAND=/home/uws/bin/MyCmd.sh
|
||||
|
||||
uws@tux>cat /home/uws/bin/MyCmd.sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
printf "[$(date +%H:%M:%S)] "
|
||||
|
||||
[17:27:25] uws@tux>
|
||||
\end{lstlisting}
|
||||
\end{justify}
|
||||
Binary file not shown.
+569
-559
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
Reference in New Issue
Block a user