diff --git a/xelatex-thesis/modules/ROOT/nav.adoc b/xelatex-thesis/modules/ROOT/nav.adoc index 2c4563a..663f939 100644 --- a/xelatex-thesis/modules/ROOT/nav.adoc +++ b/xelatex-thesis/modules/ROOT/nav.adoc @@ -1 +1,2 @@ * xref:index.adoc[list] +* xref:index-setup.adoc[examples] diff --git a/xelatex-thesis/modules/ROOT/pages/index-setup.adoc b/xelatex-thesis/modules/ROOT/pages/index-setup.adoc index 8f48287..7bc8576 100644 --- a/xelatex-thesis/modules/ROOT/pages/index-setup.adoc +++ b/xelatex-thesis/modules/ROOT/pages/index-setup.adoc @@ -1,354 +1,194 @@ -= Setup += examples -TIP: Tested on a Raspberry Pi with "Buster" -== Intro +== Bold, italics and underlining -networkd is a small and lean service to configure network interfaces, designed mostly for server use cases in a world with hotplugged and virtualized networking. Its configuration is similar in spirit and abstraction level to ifupdown, but you don't need any extra packages to configure bridges, bonds, vlan etc. It is not very suitable for managing WLANs yet; NetworkManager is still much more appropriate for such Desktop use cases. +set of examples - There are mainly three setups to have a peer to peer network: - -* unprotected ad-hoc interface by configuring the WiFi device -* unprotected ad-hoc interface using wpa_supplicant (Recommended) -* Only with suitable (RSN-IBSS capable) USB dongle: -* protected ad-hoc interface using wpa_supplicant and WPA encryption (best solution if possible) -* ad-hoc interface with additional USB/WiFi dongle for uplink to internet router - - -== Install systemd-networkd - -=== deinstall classic networking and install it! - -* *sudo su* # if not already done - -*deinstall* -[source,sh] +[source,latex] ---- -systemctl daemon-reload -systemctl disable --now ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog -apt --autoremove purge -f ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog -rm -r /etc/network /etc/dhcp - -# setup/enable systemd-resolved and systemd-networkd - -systemctl disable --now avahi-daemon libnss-mdns -apt --autoremove -f purge avahi-daemon -apt install -f libnss-resolve -ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf -apt-mark hold avahi-daemon dhcpcd dhcpcd5 ifupdown isc-dhcp-client isc-dhcp-common libnss-mdns openresolv raspberrypi-net-mods rsyslog -systemctl enable systemd-networkd.service systemd-resolved.service ----- - +The following example collects the various code fragments contained in this article so that you can open them all together in Overleaf. -== Install optional +First example, bold, italics and underline: -[source,sh] ----- -apt-get install raspberrypi-kernel-headers -y ----- +Some of the \textbf{greatest} discoveries in \underline{science} were made by \textbf{\emph{accident}}. +\vspace{1.5cm} +Example of italicized text: -=== setup wired connection +Some of the greatest discoveries in science were made by \emph{accident}. -*wired connection* -[source,sh] ----- -cat > /etc/systemd/network/04-wired.network < -Gateway=192.168.1.1 // <2> -DNS=8.8.8.8 1.1.1.1 // <3> -MulticastDNS=yes -EOF ----- -<1> use your settings -<2> use your settings -<2> use your settings +\vspace{1.5cm} +Example of boldface text: -=== Reboot +Some of the \textbf{greatest} discoveries in science were made by accident. -NOTE: reboot +\vspace{1.5cm} -== Config +Example of underlined text: +Some of the greatest discoveries in \underline{science} were made by accident. -=== NSS +\vspace{1.5cm} -*config nss* -[source,sh] ----- -apt --autoremove purge avahi-daemon -apt-mark hold avahi-daemon -apt install -f libnss-resolve - -echo "" -echo "For troubleshooting you may have a look at /etc/nsswitch.conf. It should contain a line like this:" -echo "" -echo "hosts: files resolve [!UNAVAIL=return] dns" -echo "" -echo "" -echo "" -echo "" ----- +Example of emphasized text in different contexts: +Some of the greatest \emph{discoveries} in science were made by accident. -=== DNS +\textit{Some of the greatest \emph{discoveries} in science were made by accident.} +\textbf{Some of the greatest \emph{discoveries} in science were made by accident.} -*config dns* -[source,sh] ---- -echo "" -echo "Configure DNS stub listener interface" -echo "" - -echo "Here we have to symlink /etc/resolv.conf to the stub listener:" -echo "" -echo " exec4you ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf" -ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf -echo "" +== Font sizes, families, and styles -echo "Check name resolution" - - -resolvectl status +set of examples +[source,latex] ---- +\documentclass{article} +\begin{document} +%Example of different font sizes and types +This is a simple example, {\tiny this will show different font sizes} and also \textsc{different font styles}. -== unprotected ad-hoc interface using wpa_supplicant - -Follow *Install systemd-networkd* +\vspace{1cm} -Then come back here. +%Example of different font sizes and types +In this example the {\huge huge font size} is set and the {\footnotesize Foot note size also}. There's a fairly large set of font sizes. -TIP: unprotected +\vspace{1cm} -* *sudo su* # if not already done +%Example of different font sizes and types +In this example, a command and a switch are used. \texttt{A command is used to change the style of a sentence}. -[source,sh] ----- +\sffamily +A switch changes the style from this point to the end of the document unless another switch is used. +\rmfamily -cat > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf < /etc/wpa_supplicant/wpa_supplicant-wlan1.conf <