\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{misterrabinhalder} \pdfinfo{ /Title (systemd.pdf) /Creator (Cheatography) /Author (misterrabinhalder) /Subject (Systemd Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Systemd Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{misterrabinhalder} via \textcolor{DarkBackground}{\uline{cheatography.com/35799/cs/18773/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}misterrabinhalder \\ \uline{cheatography.com/misterrabinhalder} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 11th February, 2019.\\ Updated 1st March, 2019.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Features}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Socket-based activation} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Bus-based activation} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Device-based activation} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Path-based activation} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Mount and automount point management} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Aggressive parallelization} \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Transactional unit activation logic} \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Backwards compatibility with SysV init} \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Configuration}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{/etc/systemd/system.conf}} override default configuration} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Unit Types}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.service}} A system service} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{.target}} A group of systemd units} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.automount}} A file system automount point} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{.device}} A device file recognized by the kernel} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.mount}} A file system mount point} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{.path}} A file or directory in a file system} \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.scope}} An externally created process} \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{.slice}} A group of hierarchically organized units that manage system processes} \tn % Row Count 9 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.snapshot}} A saved state of the systemd manager} \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{.socket}} An inter-process communication socket} \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.swap}} A swap device or a swap file} \tn % Row Count 12 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{.timer}} A systemd timer} \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Unit File Locations}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{/usr/lib/systemd/system/}} Systemd unit files distributed with installed packages} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{/run/systemd/system/}} Systemd unit files created at run time} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{/etc/systemd/system/}} Systemd unit files for extending a service} \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Logs}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -b}} show all messages from this boot} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -b -1}} show all messages from previous boot} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -{}-since="2012-10-30 18:17:16"}} show all messages from date and optional time} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -{}-since "20 min ago"}} show all messages since 20 minutes ago} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -f}} show new messages} \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl /usr/lib/systemd/systemd}} show all messages by a specific executable} \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl \_PID=1}} show all messages by a specific process} \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -u man-db.service}} show all messages by a specific unit} \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -k}} show kernel ring buffer:} \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -p err..alert}} Show only error, critical, and alert priority messages} \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl SYSLOG\_FACILITY=10}} show auth.log equivalent by filtering on syslog facility} \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -{}-file \seqsplit{/var/log/journal/*/system}.journal -f}} force journalctl to look only into most recent journal} \tn % Row Count 22 (+ 3) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -{}-vacuum-size=100M}} remove archived journal files until the disk space they use falls below 100M} \tn % Row Count 25 (+ 3) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{journalctl -{}-vacuum-time=2weeks}} make all journal files contain no data older than 2 weeks} \tn % Row Count 27 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Boot Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{bootctl -{}-path={\emph{esp}} status}} shows brief information about the system firmware} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{bootctl -{}-path={\emph{esp}} install}} installs systemd-boot into the EFI system partition} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{bootctl -{}-path={\emph{esp}} update}} updates all installed versions of systemd-boot} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{bootctl -{}-path={\emph{esp}} remove}} removes all installed versions of systemd-boot} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{bootctl -{}-path={\emph{esp}} list}} shows all available boot loader entries} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{bootctl -{}-path={\emph{esp}} set-default ID}} sets the default boot loader entry} \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Control Group Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemd-cgls}} shows the cgroup hierarchy in a pretty tree} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Device Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{udevadm info {\emph{options}} {\emph{devpath}}}} query the udev database for device information} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{udevadm trigger {\emph{options}} {\emph{devpath}}}} request device events from the kernel} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{udevadm settle {\emph{options}}}} watches the udev event queue} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{udevadm control {\emph{option}}}} modify the internal state of the running udev daemon} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{udevadm monitor {\emph{options}}}} listens to the kernel uevents} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{udevadm test {\emph{options}} {\emph{devpath}}}} simulate a udev event run for the given device and print debug output} \tn % Row Count 13 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Coredump Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{coredumpctl list}} list core dumps} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{coredumpctl info}} show information about core dump} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{coredumpctl dump}} extract the core dump} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{coredumpctl debug}} invoke debugger on a core dump} \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Hostname Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{hostnamectl status}} show current system hostname and related information} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{hostnamectl set-hostname {\emph{name}}}} set the system hostname to {\emph{name}}} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Services}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-units -{}-type service}} list all currently loaded service units} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-units -{}-type service -{}-all}} list all loaded service units regardless of their state} \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-unit-files -{}-type service}} list all available service units to see if they are enabled} \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl status {\emph{name.service}}}} show detailed information about a service unit} \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl is-active {\emph{name.service}}}} verify a particular service unit is running} \tn % Row Count 12 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl is-enabled {\emph{name.service}}}} verify a particular service unit is enabled} \tn % Row Count 14 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-dependencies -{}-after {\emph{name.service}}}} show units ordered to start before a service unit} \tn % Row Count 17 (+ 3) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-dependencies -{}-before {\emph{name.service}}}} show units ordered to start after a service unit} \tn % Row Count 20 (+ 3) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl start {\emph{name.service}}}} start a service unit} \tn % Row Count 22 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl stop {\emph{name.service}}}} stop a service unit} \tn % Row Count 24 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl restart {\emph{name.service}}}} restart a service unit} \tn % Row Count 26 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl try-restart {\emph{name.service}}}} restart a service unit if corresponding service running} \tn % Row Count 28 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl reload {\emph{name.service}}}} reload service unit configuration file} \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Services (cont)}} \tn % Row 13 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl enable {\emph{name.service}}}} enable service unit} \tn % Row Count 2 (+ 2) % Row 14 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl reenable {\emph{name.service}}}} reenable service unit} \tn % Row Count 4 (+ 2) % Row 15 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl disable {\emph{name.service}}}} disable service unit} \tn % Row Count 6 (+ 2) % Row 16 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl mask {\emph{name.service}}}} mask service unit to prevent from being started} \tn % Row Count 8 (+ 2) % Row 17 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl unmask {\emph{name.service}}}} unmask a service unit} \tn % Row Count 10 (+ 2) % Row 18 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl daemon-reload}} notify new service file exists} \tn % Row Count 12 (+ 2) % Row 19 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemd-delta}} show overridden units} \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Locale}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{localectl status}} show current status} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{localectl list-locales}} list available locales} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{ localectl set-locale LANG={\emph{locale}}}} set new locale} \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{localectl list-keymaps}} list available keymaps} \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{localectl set-keymap {\emph{map}}}} set new keymap} \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{localectl set-x11-keymap {\emph{map}}}} set console and x11 keymap} \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{localectl -{}-no-convert set-x11-keymap {\emph{map}}}} set x11 keymap} \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Date and Time}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl}} show current date and time} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl set-time {\emph{HH:MM:SS}}}} change current time} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl set-local-rtc {\emph{boolean}}}} set clock in local time} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl set-time {\emph{YYYY-MM-DD}}}} change current date} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl list-timezones}} list all available time zones} \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl set-timezone {\emph{time\_zone}}}} set new timezone} \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{timedatectl set-ntp {\emph{boolean}}}} set or unset NTP service} \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Container Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemd-nspawn -b -D {\emph{/path/to/os/tree}}}} run OS in a namespace container} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemd-nspawn -b -D {\emph{/path/to/os/tree}} -M {\emph{machine\_name}} -{}-network-bridge={\emph{bridge\_name}}}} run OS in a namespace container} \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Ctril+{]}{]}{]}}} kill the container from inside} \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl list}} list currently running containers} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl status {\emph{machine\_name}}}} show runtime status information about the container} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl show {\emph{machine\_name}}}} show properties about the container} \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl start {\emph{machine\_name}}}} start container as a system service by the name in /var/lib/machines/} \tn % Row Count 15 (+ 3) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl login {\emph{machine\_name}}}} open an interactive terminal login session in container} \tn % Row Count 17 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl shell}} opean an interactive shell session in a container} \tn % Row Count 19 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl enable {\emph{machine\_name}}}} enable a container as a system service} \tn % Row Count 21 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl disable *machine\_name}} disable a container as a system service} \tn % Row Count 23 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl reboot {\emph{machine\_name}}}} reboot a container} \tn % Row Count 25 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl terminate {\emph{machine\_name}}}} terminates a container} \tn % Row Count 27 (+ 2) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl kill {\emph{machine\_name}}}} send a signal to processes of the container} \tn % Row Count 29 (+ 2) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl bind {\emph{machine\_name}} {\emph{host\_path}} {\emph{container\_path}}}} bind mounts from the host into the container} \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Container Management (cont)}} \tn % Row 15 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl copy-to {\emph{machine\_name}} {\emph{host\_path}} {\emph{container\_path}}}} copies from the host into a running container} \tn % Row Count 3 (+ 3) % Row 16 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{machinectl copy-from {\emph{machine\_name}} {\emph{container\_path}} {\emph{host\_path}}}} copies from container into the host system} \tn % Row Count 6 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Network Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{networkctl list}} show list of links} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{networkctl status {\emph{link}}}} show information about specified link} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{networkctl lldp {\emph{link}}}} show LLDP neighbors} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{networkctl label}} show numerical address labels} \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl start systemd-networkd.service}} start systemd-networkd daemon} \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl enable systemd-networkd.service}} start systemd-networkd daemon at boot} \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Domain Name Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl start systemd-resolvd.service}} start systemd-resolved daemon} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl enable systemd-resolved.service}} start systemd-resolved daemon at boot} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl query {\emph{www.example.com}}}} show the address of the {\emph{www.example.com}} domain} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl query {\emph{8.8.8.8}}}} show the domain of the {\emph{8.8.8.8}} IP address} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl status {\emph{link}}}} show global and per-link DNS} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvect statistics}} show resolver statistics} \tn % Row Count 11 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl reset-statistics}} reset the statistics} \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl flush-caches}} flushes all DNS resource record cache} \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl reset-server-features}} flushes all feature resolver learnt} \tn % Row Count 17 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl dns ...}} get/set per-interface DNS} \tn % Row Count 18 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{resolvectl revert {\emph{link}}}} revert per-interface DNS} \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{ln -sf \seqsplit{/run/systemd/resolve/stub-resolv}.conf /etc/resolv.conf}} provide NSS service} \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Targets}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{poweroff.target}} shut down and power off the system} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{rescue.target}} set up rescue shell} \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{multi-user.target}} set up non graphical multi user system} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{graphical.target}} set up graphical multi user system} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{reboot.target}} shutdown and reboot the system} \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-units -{}-type target}} lists currently loaded target units} \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl list-units -{}-type target -{}-all}} lists all loaded target units} \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl isolate {\emph{name.target}}}} changes the current target} \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl get-default}} view default target} \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl set-default {\emph{name.target}}}} set desired target} \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl isolate {\emph{name.target}}}} change current to desired target} \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl rescue}} change current target and enter rescue mode} \tn % Row Count 21 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl -{}-no-wall rescue}} change current target and enter rescue mode} \tn % Row Count 23 (+ 2) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl emergency}} change the current target and enter emergency mode} \tn % Row Count 25 (+ 2) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl -{}-no-wall emergency}} change the current target and enter emergency mode} \tn % Row Count 27 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Power Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl halt}} halts the system} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl poweroff}} powers off the system} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl reboot}} restarts the system} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl suspend}} suspends the system} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl hibernate}} hibernates the system} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{systemctl hybrid-sleep}} hibernates and suspends the system} \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Login Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl list-sessions}} list current sessions} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl session-status {\emph{id}}}} show runtime status information} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl show-session {\emph{id}}}} show properties of one or more sessions} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl activate {\emph{id}}}} activate a session} \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl lock-session {\emph{id}}}} activates the screen lock} \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl unlock-session {\emph{id}}}} deactivates the screen lock} \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl terminate-session {\emph{id}}}} terminates a session} \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl kill-session {\emph{id}}}} send a signal to one or more processes of the session} \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl list-users}} list currently logged in users} \tn % Row Count 16 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl terminate-user {\emph{user}}}} terminates all sessions of a user} \tn % Row Count 18 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl kill-user {\emph{user}}}} send a signal to all processes of a user} \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{loginctl list-seats}} list currently available seats on the local system} \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{D-Bus Management}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{busctl list}} show all peers on the bus, by their service names} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{busctl status {\emph{service}}}} show process information and credentials of a bus service} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{busctl monitor {\emph{service}}}} dump messages being exchanged} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{busctl capture {\emph{service}}}} writes the output in pcap format} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{busctl tree {\emph{service}}}} shows an object tree of one or more services} \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}