\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{River L. (Tamaranth)} \pdfinfo{ /Title (linux-commands-and-options.pdf) /Creator (Cheatography) /Author (River L. (Tamaranth)) /Subject (Linux Commands \& Options 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}{009152} \definecolor{LightBackground}{HTML}{EFF8F4} \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{Linux Commands \& Options Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{River L. (Tamaranth)} via \textcolor{DarkBackground}{\uline{cheatography.com/42882/cs/46551/}}} \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}River L. (Tamaranth) \\ \uline{cheatography.com/tamaranth} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 7th July, 2025.\\ 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*}{2} \begin{tabularx}{8.4cm}{x{2.72 cm} x{5.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Command Redirection}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{\textless{}}}` & Gets input from somewhere other than stdin (keyboard) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} `{\bf{\textgreater{}}}` & Sends output somewhere other than stdout (monitor) \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} `{\bf{1\textgreater{}}}` & Alternative to "\textgreater{}" (not really used) \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} `{\bf{\textgreater{}\textgreater{}}}` & Redirects stdout; {\bf{appends}} it to existing content (instead of overwriting it) \tn % Row Count 11 (+ 4) % Row 4 \SetRowColor{LightBackground} `{\bf{2\textgreater{}}}` & Redirects only error messages (stderr) \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} `{\bf{\&\textgreater{}}}` & Redirects both stdout and stderr \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} `{\emph{cmd1}} {\bf{|}} {\emph{cmd2}}` & Pipes {\emph{cmd1}} into {\emph{cmd2}}\{\{nl\}\}(uses the {\bf{output}} of cmd1 as the {\bf{input}} for cmd2) \tn % Row Count 19 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Basic File/Directory Commands}} \tn % Row 0 \SetRowColor{LightBackground} \{\{rowspan=6\}\}`{\bf{ls}} {\emph{dir1}}` & \{\{ac\}\}\{\{colspan=2\}\}List contents of dir1 & \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} & `{\bf{-l}}` & additional info (owner, perms, etc.) \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} & `{\bf{-a}}` & lists all, including hidden files \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} & `{\bf{-i}}` & adds file inode to info displayed \tn % Row Count 13 (+ 3) % Row 4 \SetRowColor{LightBackground} & `{\bf{-h}}` & adds file size in \seqsplit{human-readable} format\{\{nl\}\}(e.g. MB instead of bytes) \tn % Row Count 19 (+ 6) % Row 5 \SetRowColor{white} & `{\bf{-d}}` & info for directory itself (rather than its contents) \tn % Row Count 23 (+ 4) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 23 (+ 0) % Row 7 \SetRowColor{white} \{\{rowspan=3\}\}`{\bf{mkdir}} {\emph{dir1}}` & \{\{ac\}\}\{\{colspan=2\}\}Create a new directory & \tn % Row Count 27 (+ 4) % Row 8 \SetRowColor{LightBackground} & `{\bf{-p}}` & creates full path (multiple directories if needed) \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Basic File/Directory Commands (cont)}} \tn % Row 9 \SetRowColor{LightBackground} & `{\bf{-v}}` & verbose (output shows action taken) \tn % Row Count 3 (+ 3) % Row 10 \SetRowColor{white} \{\{rowspan=3\}\}`{\bf{cp}} {\emph{dir1 dir2}}` & & \{\{colspan=2\}\}Copy dir1 into dir2 \tn % Row Count 6 (+ 3) % Row 11 \SetRowColor{LightBackground} & `{\bf{-r}}` & recursively ("and its contents") \tn % Row Count 9 (+ 3) % Row 12 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 9 (+ 0) % Row 13 \SetRowColor{LightBackground} \{\{rowspan=3\}\}`{\bf{rm}} {\emph{dir1}}` & \{\{ac\}\}\{\{colspan=2\}\}Removes (deletes) an empty directory & \tn % Row Count 14 (+ 5) % Row 14 \SetRowColor{white} & `{\bf{-r}}` & recursively ("and it's contents"), including special files \tn % Row Count 19 (+ 5) % Row 15 \SetRowColor{LightBackground} & `{\bf{-i}}` & \seqsplit{interactively} delete files (ask before deleting) \tn % Row Count 23 (+ 4) % Row 16 \SetRowColor{white} \{\{rowspan=3\}\}`{\bf{mv}} {\emph{file1}} {\emph{dir1}}` & \{\{ac\}\}\{\{colspan=2\}\}Move file1 into dir1 & \tn % Row Count 26 (+ 3) % Row 17 \SetRowColor{LightBackground} & `{\bf{-v}}` & verbose (output shows action taken) \tn % Row Count 29 (+ 3) % Row 18 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 29 (+ 0) % Row 19 \SetRowColor{LightBackground} \{\{nobreak\}\}\{\{rowspan=2\}\}`{\bf{ln}} {\emph{target}} {\emph{link}}` & \{\{ac\}\}\{\{colspan=2\}\}Creates a hard link from file "link" to file "target" & \tn % Row Count 35 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Basic File/Directory Commands (cont)}} \tn % Row 20 \SetRowColor{LightBackground} & `{\bf{-s}}` & makes a symbolic link instead of a hard link \tn % Row Count 4 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Locating Files}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{locate}} {\emph{pattern}}` & \{\{ac\}\}\{\{colspan=2\}\}Search for file names with specified pattern (via "locate" database) & \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} `{\bf{updatedb}}` & \{\{ac\}\}\{\{colspan=2\}\}Update the "locate" database & \tn % Row Count 11 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 11 (+ 0) % Row 3 \SetRowColor{white} \{\{bt=1\}\}\{\{nobreak\}\}\{\{rowspan=13\}\}`{\bf{find}} {\emph{/dir}} {\bf{-}}{\emph{how what}}` & \{\{bt=1\}\}\{\{ac\}\}\{\{colspan=2\}\}Recursive search starting at "{\emph{/dir}}" for pattern ("what") of specified type ("how") & \{\{bt=1\}\} \tn % Row Count 20 (+ 9) % Row 4 \SetRowColor{LightBackground} & `{\bf{-name}} {\emph{name}}` & {\bf{case-sensitive}} search for file name \tn % Row Count 23 (+ 3) % Row 5 \SetRowColor{white} & `{\bf{-iname}} {\emph{name}}` & case-{\bf{in}}sensitive search for file name \tn % Row Count 27 (+ 4) % Row 6 \SetRowColor{LightBackground} & `{\bf{-user}} {\emph{name}}` & files owned by user with specified username \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Locating Files (cont)}} \tn % Row 7 \SetRowColor{LightBackground} & `{\bf{-uid}} {\emph{1002}}` & files owned by user with UID 1002 \tn % Row Count 3 (+ 3) % Row 8 \SetRowColor{white} & `{\bf{-size}} {\emph{100M}}` & files that are {\bf{exactly}} 100 MB in size \tn % Row Count 7 (+ 4) % Row 9 \SetRowColor{LightBackground} & `{\bf{-size}} {[}{\bf{+}}/{\bf{-}}{]}{\emph{100M}}` & files that are {[}{\bf{larger}}/{\bf{smaller}}{]} than 100 MB \tn % Row Count 11 (+ 4) % Row 10 \SetRowColor{white} & `{\bf{-type f}}` & specifically files (not directories) \tn % Row Count 14 (+ 3) % Row 11 \SetRowColor{LightBackground} & `{\bf{-perm /o=w}}` & files where at least "{\bf{o}}ther" has {\bf{w}}rite perms \tn % Row Count 18 (+ 4) % Row 12 \SetRowColor{white} & `{\bf{inum}} {\emph{inode}}` & file names associated with specified inode (i.e. including linked files) \tn % Row Count 24 (+ 6) % Row 13 \SetRowColor{LightBackground} & `{\bf{-mmin -}}{\emph{5}}` & files {\bf{m}}odified in the last {\emph{5}} {\bf{min}}utes \tn % Row Count 28 (+ 4) % Row 14 \SetRowColor{white} & `{\bf{-ctime}}` & creation time \tn % Row Count 29 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{\textless{} `find /usr -size +100M {\bf{-exec ls -lh \{\} \textbackslash{};}}` \textgreater{} \newline shows `ls -l` output AND actual file size of search results \newline (essentially "pipes" results of `find` into `ls -lh`)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.356 cm} x{2.66 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Users \& Groups}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{{\emph{Command}}}} & {\bf{{\emph{Options}}}} & \{\{width=60\}\}{\bf{{\emph{What It Does}}}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} `{\bf{id}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Show UID, GID, \& secondary groups\{\{nl\}\}(current user if not specified) & \tn % Row Count 10 (+ 7) % Row 2 \SetRowColor{LightBackground} `{\bf{getent passwd}} {\emph{usr1}}` & \{\{ac\}\}\{\{colspan=2\}\}Find out if usr1 is known to the system & \tn % Row Count 15 (+ 5) % Row 3 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{useradd}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Add a new user & \tn % Row Count 18 (+ 3) % Row 4 \SetRowColor{LightBackground} & `{\bf{-u}} {\emph{\#}}` & set a specific UID \tn % Row Count 20 (+ 2) % Row 5 \SetRowColor{white} & \{\{nobreak\}\}`{\bf{-s /sbin/nologin}}` & create a user without a login shell \tn % Row Count 23 (+ 3) % Row 6 \SetRowColor{LightBackground} \{\{rowspan=6\}\}`{\bf{usermod}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Change properties of existing user & \tn % Row Count 27 (+ 4) % Row 7 \SetRowColor{white} & `{\bf{-c "}}{\emph{text{\bf{}}"}}` & adds text to comment field \tn % Row Count 29 (+ 2) % Row 8 \SetRowColor{LightBackground} & `{\bf{-g}} {\emph{group1}}` & changes {\bf{primary group}} to group1 \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.356 cm} x{2.66 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Users \& Groups (cont)}} \tn % Row 9 \SetRowColor{LightBackground} & `{\bf{-G}} {\emph{group1}}` & {\bf{replaces}} \seqsplit{supplementary} group with group1 \tn % Row Count 4 (+ 4) % Row 10 \SetRowColor{white} & `{\bf{-aG}} {\emph{group1}}` & {\bf{appends}} group1 to \seqsplit{supplementary} groups \tn % Row Count 8 (+ 4) % Row 11 \SetRowColor{LightBackground} & `{\bf{-L}} {\emph{user1}}` & locks user1's account (instead of deleting) \tn % Row Count 12 (+ 4) % Row 12 \SetRowColor{white} `{\bf{newgrp}} {\emph{group1}}` & \{\{ac\}\}\{\{colspan=2\}\}Change current user's primary group\{\{nl\}\}({\bf{temporary}}; current session only) & \tn % Row Count 19 (+ 7) % Row 13 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{userdel}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Deletes user1 but {\bf{not}} their home directory & \tn % Row Count 24 (+ 5) % Row 14 \SetRowColor{white} & `{\bf{-r}}` & deletes both user {\bf{and}} home directory \tn % Row Count 28 (+ 4) % Row 15 \SetRowColor{LightBackground} `{\bf{groups}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Displays simple list of groups user1 is a member of & \tn % Row Count 33 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.356 cm} x{2.66 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Users \& Groups (cont)}} \tn % Row 16 \SetRowColor{LightBackground} `{\bf{passwd}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Set password for user1 & \tn % Row Count 3 (+ 3) % Row 17 \SetRowColor{white} \{\{rowspan=7\}\}`{\bf{chage}} {\emph{user1}}` & \{\{ac\}\}\{\{colspan=2\}\}Change password aging properties for user & \tn % Row Count 8 (+ 5) % Row 18 \SetRowColor{LightBackground} & `{\bf{-m}} {\emph{days}}` & minimum \# of days between password changes \tn % Row Count 12 (+ 4) % Row 19 \SetRowColor{white} & `{\bf{-M}} {\emph{days}}` & maximum \# of days between password changes \tn % Row Count 16 (+ 4) % Row 20 \SetRowColor{LightBackground} & `{\bf{-W}} {\emph{days}}` & warning period before password expires \tn % Row Count 19 (+ 3) % Row 21 \SetRowColor{white} & `{\bf{-I}} {\emph{days}}` & inactivity period (password usable after expiration) \tn % Row Count 23 (+ 4) % Row 22 \SetRowColor{LightBackground} & `{\bf{-d 0}}` & require password change on next login \tn % Row Count 26 (+ 3) % Row 23 \SetRowColor{white} & `{\bf{-E}} {\emph{date}}` & date when {\bf{account}} expires \tn % Row Count 29 (+ 3) % Row 24 \SetRowColor{LightBackground} \{\{nobreak\}\}`{\bf{getent group}} {\emph{grp1}}` & \{\{ac\}\}\{\{colspan=2\}\}Find out if grp1 is known to the system & \tn % Row Count 34 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.356 cm} x{2.66 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Users \& Groups (cont)}} \tn % Row 25 \SetRowColor{LightBackground} \{\{rowspan=3\}\}`{\bf{groupadd}} {\emph{group1}}` & \{\{ac\}\}\{\{colspan=2\}\}Create a new group & \tn % Row Count 3 (+ 3) % Row 26 \SetRowColor{white} & `{\bf{-g}} {\emph{\#}}` & set a specific GID \tn % Row Count 5 (+ 2) % Row 27 \SetRowColor{LightBackground} & `{\bf{-r}}` & create a {\bf{system}} group \tn % Row Count 7 (+ 2) % Row 28 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{groupmod}} {\emph{group1}}` & \{\{ac\}\}\{\{colspan=2\}\}Change properties of existing group & \tn % Row Count 11 (+ 4) % Row 29 \SetRowColor{LightBackground} & `{\bf{-g}} {\emph{\#}}` & change GID to specified number \tn % Row Count 14 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{To set the number of days from today when user's {\bf{account}} expires: \newline `{\bf{chage -E \$(date +}}{\emph{days}} {\bf{\%Y-\%m-\%d)}}` \newline \newline To give full admin privileges to a user or group: \newline `{\bf{echo "}}{[}{\emph{user1}}|{\bf{\%}}{\emph{group1}}{]} {\bf{ALL=(ALL) ALL" \textgreater{}\textgreater{} /etc/sudoers.d/}}{\emph{name}}`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Ownership \& Permissions}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{chown}} {\emph{user{\bf{}}:}}{\emph{group}}` & \{\{ac\}\}\{\{colspan=2\}\}Change owning user {\bf{and}} owning group & \{\{width=80\}\} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} `{\bf{chown :}}{\emph{group}}` & \{\{ac\}\}\{\{colspan=2\}\}Change only owning group & \tn % Row Count 9 (+ 4) % Row 2 \SetRowColor{LightBackground} `{\bf{chgrp}} {\emph{group file}}` & \{\{ac\}\}\{\{colspan=2\}\}Alternate way to change owning group & \tn % Row Count 14 (+ 5) % Row 3 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 14 (+ 0) % Row 4 \SetRowColor{LightBackground} \{\{nobreak\}\}\{\{rowspan=6\}\}`{\bf{chmod}} {[}{\emph{perms}}{]} {\emph{file}}` & \{\{ac\}\}\{\{colspan=2\}\}Change \seqsplit{file/directory} permissions & \tn % Row Count 18 (+ 4) % Row 5 \SetRowColor{white} & `{\bf{-R}}` & recursive; applies to directory and all contents \tn % Row Count 22 (+ 4) % Row 6 \SetRowColor{LightBackground} & `{\bf{g+r}}` & grants owning {\bf{g}}roup the {\bf{r}}ead permission \tn % Row Count 26 (+ 4) % Row 7 \SetRowColor{white} & `{\bf{a-x}}` & removes e{\bf{x}}ecute perms for {\bf{a}}ll parties (without changing other perms) \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Ownership \& Permissions (cont)}} \tn % Row 8 \SetRowColor{LightBackground} & \{\{nobreak\}\}`{\bf{-R a=rwX}}` & recursively set perms for {\bf{a}}ll parties to {\bf{rw}}, with {\bf{x}} perms on directory {\bf{only}} \tn % Row Count 7 (+ 7) % Row 9 \SetRowColor{white} & `{\bf{770}}` & octally set rwx perms for owning user \& group, 0 for other \tn % Row Count 12 (+ 5) % Row 10 \SetRowColor{LightBackground} \{\{rowspan=8\}\}`{\bf{chmod}} {[}{\emph{perms}}{]} {\emph{file}}` & \{\{ac\}\}\{\{colspan=2\}\}(cont'd) Change special permissions & \tn % Row Count 17 (+ 5) % Row 11 \SetRowColor{white} & `{\bf{o+t}} {\emph{dir}}` & set S{\bf{t}}icky bit (in {\bf{o}}ther)\{\{nl\}\}{\bf{*}} {\emph{For directories only}} {\bf{*}} \tn % Row Count 23 (+ 6) % Row 12 \SetRowColor{LightBackground} & `{\bf{1}}{\emph{xxx}}` & set Sticky bit – octal form\{\{nl\}\}({\emph{xxx}} = regular perms) \tn % Row Count 28 (+ 5) % Row 13 \SetRowColor{white} & `{\bf{g+s}} {\emph{dir/file}}` & set {\bf{S}}etGID bit (in {\bf{g}}roup)\{\{nl\}\}{\bf{*}} {\emph{For directories and files}} {\bf{*}} \tn % Row Count 35 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Ownership \& Permissions (cont)}} \tn % Row 14 \SetRowColor{LightBackground} & `{\bf{2}}{\emph{xxx}}` & set SetGID bit – octal form \tn % Row Count 3 (+ 3) % Row 15 \SetRowColor{white} & `{\bf{3}}{\emph{xxx}}` & set {\bf{both}} Sticky \& SetGID bits\{\{nl\}\}(chmod "1"+"2") \tn % Row Count 8 (+ 5) % Row 16 \SetRowColor{LightBackground} & `{\bf{u+s}} {\emph{file}}` & set {\bf{S}}etUID bit (in {\bf{u}}ser)\{\{nl\}\}{\bf{*}} {\emph{For files only}} {\bf{*}} \tn % Row Count 14 (+ 6) % Row 17 \SetRowColor{white} & `{\bf{4}}{\emph{xxx}}` & set SetUID bit – octal form \tn % Row Count 17 (+ 3) % Row 18 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 17 (+ 0) % Row 19 \SetRowColor{white} \{\{rowspan=3\}\}`{\bf{umask}}` & \{\{ac\}\}\{\{colspan=2\}\}Displays currently set umask\{\{nl\}\}(when used by itself) & \tn % Row Count 23 (+ 6) % Row 20 \SetRowColor{LightBackground} & `{\bf{077}}` & removes default perms\{\{nl\}\}(0 from user, 7 from group/other) \tn % Row Count 28 (+ 5) % Row 21 \SetRowColor{white} & `{\bf{0077}}` & preserves any special perms when removing defaults \tn % Row Count 32 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Octal Expression Values: {\bf{r}}={\bf{4}} | {\bf{w}}={\bf{2}} | {\bf{x}}={\bf{1}} \newline \newline Default permissions (on vanilla Linux): \newline {\bf{directories}}={\bf{777}} | {\bf{files}}={\bf{666}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Page Break}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.976 cm} x{2.812 cm} x{2.812 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Jobs \& Load Handling}} \tn % Row 0 \SetRowColor{LightBackground} \{\{rowspan=3\}\}`{\bf{w}}` & \{\{colspan=2\}\}Displays currently logged-in users, login method, time, \& resource usage info & \{\{width=80\}\} \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} & `{\bf{-{}-from}}` & shows users' IP addresses\{\{nl\}\}(in addition to regular output) \tn % Row Count 12 (+ 5) % Row 2 \SetRowColor{LightBackground} & `{\bf{-u}} {\emph{username}}` & limits output to specified username \tn % Row Count 15 (+ 3) % Row 3 \SetRowColor{white} `{\emph{command}} {\bf{\&}}` & \{\{colspan=2\}\}Starts a new job in the background & \tn % Row Count 19 (+ 4) % Row 4 \SetRowColor{LightBackground} `{\bf{jobs}}` & \{\{colspan=2\}\}Displays jobs running in the background\{\{nl\}\}("{\bf{+}}" = default job) & \tn % Row Count 25 (+ 6) % Row 5 \SetRowColor{white} `{\bf{fg \%}}{\emph{1}}` & \{\{colspan=2\}\}Brings job 1 to the foreground & \tn % Row Count 29 (+ 4) % Row 6 \SetRowColor{LightBackground} `{\bf{bg \%}}{\emph{1}}` & \{\{colspan=2\}\}Sends job 1 to the background & \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.976 cm} x{2.812 cm} x{2.812 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Jobs \& Load Handling (cont)}} \tn % Row 7 \SetRowColor{LightBackground} `{\bf{pidof}} {\emph{command}}` & \{\{colspan=2\}\}Returns the PID(s) of a currently running job & \tn % Row Count 5 (+ 5) % Row 8 \SetRowColor{white} `{\bf{systemctl status}} {\emph{cmd}}` & \{\{colspan=2\}\}Shows main PID of a process, among other things\{\{nl\}\}(can use if `pidof` returns multiple) & \tn % Row Count 13 (+ 8) % Row 9 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 13 (+ 0) % Row 10 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{\{\{bt=2\}\}\{\{ac\}\}\{\{colspan=3\}\}{\bf{-{}-{}- CPU Load Handling -{}-{}-}}} \tn % Row Count 15 (+ 2) % Row 11 \SetRowColor{LightBackground} `{\bf{uptime}}` & \{\{colspan=2\}\}Displays the load average for the last 1, 5, and 15 mins & \tn % Row Count 20 (+ 5) % Row 12 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{lscpu}}` & \{\{colspan=2\}\}Displays number of CPUs in the system, among other things & \tn % Row Count 25 (+ 5) % Row 13 \SetRowColor{LightBackground} & `{\bf{-p}}` & simplified output\{\{nl\}\}(each row of numbers = 1 CPU) \tn % Row Count 29 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{Process Priority Values: {\bf{-20}} to {\bf{19}} (default = {\bf{0}}) \newline {\emph{({\bf{negative}} = {\bf{higher}} priority}} | {\bf{{\emph{positive}} = {\bf{lower}} priority)}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.204 cm} x{2.66 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Viewing \& Managing Processes}} \tn % Row 0 \SetRowColor{LightBackground} \{\{rowspan=5\}\}`{\bf{ps}}` & \{\{colspan=2\}\}Shows info about processes; pipe to \seqsplit{`head`/`grep`/etc} for less output\{\{nl\}\}(Note: "`{\bf{{[}}}{\emph{output{\bf{}}{]}}}`" = kernel thread) & \tn % Row Count 10 (+ 10) % Row 1 \SetRowColor{white} & \{\{nobreak\}\}`{\bf{-{}-forest}}` & shows output in visual "tree" format \tn % Row Count 13 (+ 3) % Row 2 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{pstree}}` & \{\{colspan=2\}\}Shows processes in visual tree format\{\{nl\}\}{\emph{(may not always be installed)}} & \tn % Row Count 20 (+ 7) % Row 3 \SetRowColor{white} & `{\bf{-p}}` & includes PIDs in tree output \tn % Row Count 22 (+ 2) % Row 4 \SetRowColor{LightBackground} \{\{rowspan=5\}\}`{\bf{top}}` & \{\{colspan=2\}\}Linux terminal equivalent of Task Manager\{\{nl\}\}(Also shows load average)\{\{nl\}\}{\bf{Keyboard Controls:}} & \tn % Row Count 31 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.204 cm} x{2.66 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Viewing \& Managing Processes (cont)}} \tn % Row 5 \SetRowColor{LightBackground} & {\bf{k}} & send a signal to a process from within `top` \tn % Row Count 4 (+ 4) % Row 6 \SetRowColor{white} & {\bf{Shift}}+{\bf{M}} & sort by memory usage \tn % Row Count 6 (+ 2) % Row 7 \SetRowColor{LightBackground} & {\bf{Shift}}+{\bf{P}} & return to sorting by CPU usage \tn % Row Count 9 (+ 3) % Row 8 \SetRowColor{white} & {\bf{l}} / {\bf{t}} / {\bf{m}} & toggle "load", "threads", \& "memory" header lines \tn % Row Count 13 (+ 4) % Row 9 \SetRowColor{LightBackground} \{\{rowspan=3\}\}`{\bf{kill}} {\emph{PID}}` & \{\{colspan=2\}\}Sends signal 15 to specified process\{\{nl\}\}{\bf{*}} {\emph{Must use process ID}} {\bf{*}} & \tn % Row Count 20 (+ 7) % Row 10 \SetRowColor{white} & `{\bf{-}}{\emph{signal}}` & sends specified signal\{\{nl\}\}(can use signal name or number) \tn % Row Count 25 (+ 5) % Row 11 \SetRowColor{LightBackground} & `{\bf{-l}}` & displays list of signal options \tn % Row Count 28 (+ 3) % Row 12 \SetRowColor{white} `{\bf{killall}} {\emph{process}}` & \{\{colspan=2\}\}Kills processes by name instead of PID & \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.204 cm} x{2.66 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Viewing \& Managing Processes (cont)}} \tn % Row 13 \SetRowColor{LightBackground} \{\{rowspan=4\}\}`{\bf{pkill}}` & \{\{colspan=2\}\}Look up \& manage processes by name or other attributes\{\{nl\}\}(default is signal 15) & \tn % Row Count 7 (+ 7) % Row 14 \SetRowColor{white} & `{\bf{-}}{\emph{signal}}` & specify signal to send \tn % Row Count 9 (+ 2) % Row 15 \SetRowColor{LightBackground} & `{\bf{-u}} {\emph{username}}` & sends signal to user's account\{\{nl\}\}(forces logout \& shuts down their processes) \tn % Row Count 15 (+ 6) % Row 16 \SetRowColor{white} & `{\bf{-t}} {\emph{pts/22}}` & kills specified terminal session (TTY) \tn % Row Count 18 (+ 3) % Row 17 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 18 (+ 0) % Row 18 \SetRowColor{white} `{\bf{nice -n}} {\emph{x command}}` & \{\{colspan=2\}\}Starts a {\bf{new}} process with an adjusted priority value ({\emph{x}}) & \tn % Row Count 24 (+ 6) % Row 19 \SetRowColor{LightBackground} `{\bf{renice -n}} {\emph{x}} {\bf{-p}} {\emph{PID}}` & \{\{colspan=2\}\}Change the priority value ({\emph{x}}) of an {\bf{existing}} process & \tn % Row Count 30 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Managing Services \& Daemons}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\{\{ac\}\}\{\{colspan=2\}\}{\bf{-{}-{}- System Commands -{}-{}-}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `{\bf{systemctl reboot}}` & reboots the system \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} `{\bf{systemctl daemon-reload}}` & \{\{colspan=2\}\}tells systemd you've made changes to a unit file \& it needs to reinitialize those unit files \tn % Row Count 9 (+ 6) % Row 3 \SetRowColor{white} `{\bf{systemctl get-default}}` & shows which target is the default target that the system summons whenever it starts up \tn % Row Count 14 (+ 5) % Row 4 \SetRowColor{LightBackground} `{\bf{systemctl set-default}} \{\{nl\}\} {\emph{graphical.target}}` & sets default target to "graphical.target" \tn % Row Count 17 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{8.4cm}}{} \tn % Row Count 17 (+ 0) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\{\{bt=2\}\}\{\{ac\}\}\{\{colspan=2\}\}{\bf{-{}-{}- Unit Commands -{}-{}-}}} \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} `{\bf{systemctl list-units}}` & shows all the active \& loaded units on the system \tn % Row Count 22 (+ 3) % Row 8 \SetRowColor{LightBackground} \{\{ar\}\}`{\bf{-t}} {\emph{type}}` & filters output by specified type of unit \tn % Row Count 24 (+ 2) % Row 9 \SetRowColor{white} \{\{ar\}\}`{\bf{-a}}` & shows all units known to systemd\{\{nl\}\}(including "inactive" \& "not-found") \tn % Row Count 28 (+ 4) % Row 10 \SetRowColor{LightBackground} `{\bf{systemctl status}} {\emph{unit}}` & shows status \& details of specified unit (including location of unit files) \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Managing Services \& Daemons (cont)}} \tn % Row 11 \SetRowColor{LightBackground} `{\bf{systemctl is-enabled}} \{\{nl\}\} {\emph{unit.service}}` & shows whether the service is enabled\{\{nl\}\}(i.e. will start automatically on system boot) \tn % Row Count 5 (+ 5) % Row 12 \SetRowColor{white} `{\bf{systemctl is-active}} \{\{nl\}\} {\emph{unit.service}}` & shows whether the service is active \tn % Row Count 8 (+ 3) % Row 13 \SetRowColor{LightBackground} `{\bf{systemctl enable -{}-now}} \{\{nl\}\} {\emph{unit.service}}` & enables the service \& start it immediately (sets "enable" persistently) \tn % Row Count 12 (+ 4) % Row 14 \SetRowColor{white} `{\bf{systemctl disable -{}-now}} \{\{nl\}\} {\emph{unit}}` & stops service immediately \& sets to "disabled" persistently \tn % Row Count 15 (+ 3) % Row 15 \SetRowColor{LightBackground} `{\bf{systemctl reload}} {\emph{unit}}` & sends the "hang up" signal; drops config file loaded in memory \& reload it from file system \tn % Row Count 20 (+ 5) % Row 16 \SetRowColor{white} `{\bf{systemctl restart}} {\emph{unit}}` & kills the process \& starts it up again fresh\{\{nl\}\}(main PID will change) \tn % Row Count 24 (+ 4) % Row 17 \SetRowColor{LightBackground} `{\bf{systemctl reload-or-restart}} \{\{nl\}\} {\emph{unit}}` & reloads if possible, otherwise restart\{\{nl\}\}(for when you don't know if unit supports reload) \tn % Row Count 29 (+ 5) % Row 18 \SetRowColor{white} \{\{nobreak\}\}`{\bf{systemctl list-dependencies}} \{\{nl\}\} {\emph{unit.service}}` & \{\{colspan=2\}\}shows list of units required by {\emph{unit.service}} for it to work \tn % Row Count 33 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Managing Services \& Daemons (cont)}} \tn % Row 19 \SetRowColor{LightBackground} \{\{ar\}\}`{\bf{-{}-reverse}}` & shows units that call {\emph{unit.service}} \tn % Row Count 2 (+ 2) % Row 20 \SetRowColor{white} `{\bf{systemctl mask}} {\emph{unit}}` & prevents unit from being started automatically {\bf{or}} manually\{\{nl\}\}(not even via `enable -{}-now` command) \tn % Row Count 8 (+ 6) % Row 21 \SetRowColor{LightBackground} `{\bf{systemctl unmask}} {\emph{unit}}` & undoes masking on a service \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.432 cm} x{2.584 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{File Systems \& Block Devices}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{findmnt -s}}` & \{\{ac\}\}\{\{colspan=2\}\}Simplified output about mountpoints \& filesystems & \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \{\{rowspan=3\}\}`{\bf{lsblk}}` & \{\{ac\}\}\{\{colspan=2\}\}Lists block devices in tree format (incl. size, mountpoint, etc.) & \tn % Row Count 13 (+ 7) % Row 2 \SetRowColor{LightBackground} & `{\bf{-f}}` / `{\bf{-{}-fs}}` & adds info about filesystems \tn % Row Count 16 (+ 3) % Row 3 \SetRowColor{white} & `{\bf{-p}}` & shows full device paths \tn % Row Count 18 (+ 2) % Row 4 \SetRowColor{LightBackground} `{\bf{blkid}} {\emph{/dev/file}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows info about block device \& filesystem, including partition UUID\{\{nl\}\}(non-partition devices must have a filesystem to show output) & \tn % Row Count 30 (+ 12) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.432 cm} x{2.584 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{File Systems \& Block Devices (cont)}} \tn % Row 5 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{df}} {\emph{location}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows {\bf{d}}ata (storage) utilization of {\bf{f}}ilesystem, device, \& mountpoint\{\{nl\}\}(Shows info for {\bf{whole}} filesystem, even if `{\emph{location}}` is a \seqsplit{subdirectory)} & \tn % Row Count 14 (+ 14) % Row 6 \SetRowColor{white} & `{\bf{-h}}` & \seqsplit{human-readable} format\{\{nl\}\}(converts bytes to MB, GB, etc.) \tn % Row Count 19 (+ 5) % Row 7 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 19 (+ 0) % Row 8 \SetRowColor{white} \{\{rowspan=3\}\}`{\bf{du}} {\emph{/dir}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows {\bf{d}}ata (storage) {\bf{u}}tilization of a specific directory & \tn % Row Count 26 (+ 7) % Row 9 \SetRowColor{LightBackground} & `{\bf{-s}}` & summary version of output \tn % Row Count 28 (+ 2) % Row 10 \SetRowColor{white} & `{\bf{-h}}` & \seqsplit{human-readable} format\{\{nl\}\}(converts bytes to MB, GB, etc.) \tn % Row Count 33 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.432 cm} x{2.584 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{File Systems \& Block Devices (cont)}} \tn % Row 11 \SetRowColor{LightBackground} \{\{nobreak\}\}`{\bf{mkfs.}}{\emph{type /dev/file}}` & \{\{ac\}\}\{\{colspan=2\}\}Creates filesystem of specified type on specified block device\{\{nl\}\}(e.g. `mkfs.ext4 /dev/vdc1`) & \tn % Row Count 9 (+ 9) % Row 12 \SetRowColor{white} `{\bf{mount}} {\emph{/dev/file /dest}}` & \{\{ac\}\}\{\{colspan=2\}\}Takes filesystem on specified block device \& mounts it in specified directory & \tn % Row Count 17 (+ 8) % Row 13 \SetRowColor{LightBackground} `{\bf{umount}} {\emph{mountpoint}}` & \{\{ac\}\}\{\{colspan=2\}\}Unmount the filesystem at the specified mountpoint & \tn % Row Count 23 (+ 6) % Row 14 \SetRowColor{white} `{\bf{lsof}} {\emph{mountpoint}}` & \{\{ac\}\}\{\{colspan=2\}\}{\bf{L}}ist {\bf{o}}pen {\bf{f}}iles; shows which files are open in that filesystem & \tn % Row Count 31 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.432 cm} x{2.584 cm} x{2.584 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{File Systems \& Block Devices (cont)}} \tn % Row 15 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{fuser}} {\emph{mountpoint}}` & \{\{ac\}\}\{\{colspan=2\}\}Similar info as `lsof`, but less detailed & \tn % Row Count 5 (+ 5) % Row 16 \SetRowColor{white} & `{\bf{-m}}` & shows only the PID associated with the open file \tn % Row Count 9 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.9 cm} x{2.812 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{RPM Software Packages}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{rpm -qa}}` & \{\{colspan=2\}\}{\bf{Q}}uery {\bf{a}}ll; shows all software packages installed on the system & \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} `{\bf{rpm -qf}} {\emph{/file}}` & \{\{colspan=2\}\}{\bf{Q}}uery {\bf{f}}ile; asks RPM database which software package owns "{\emph{/file}}" & \tn % Row Count 13 (+ 7) % Row 2 \SetRowColor{LightBackground} \{\{rowspan=5\}\}`{\bf{rpm -qp}}` & \{\{colspan=2\}\}{\bf{Q}}uery {\bf{p}}ackage; runs command against the .rpm file itself & \tn % Row Count 19 (+ 6) % Row 3 \SetRowColor{white} & `{\bf{-}}qp{\bf{l}}` & {\bf{l}}ist of files in the .rpm package \tn % Row Count 22 (+ 3) % Row 4 \SetRowColor{LightBackground} & `{\bf{-}}qp{\bf{c}}` & shows {\bf{c}}onfig files shipped with the package \tn % Row Count 26 (+ 4) % Row 5 \SetRowColor{white} & `{\bf{-}}qp{\bf{d}}` & shows {\bf{d}}ocumentation files shipped with the package \tn % Row Count 30 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.9 cm} x{2.812 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{RPM Software Packages (cont)}} \tn % Row 6 \SetRowColor{LightBackground} & `{\bf{-}}qp{\bf{i}}` & {\bf{i}}nformation about the package file (metadata, summary, software description, etc.) \tn % Row Count 6 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.66 cm} x{2.66 cm} x{2.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Managing Software Packages (DNF)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{\{\{colspan=3\}\}{\bf{Info Commands:}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `{\bf{dnf info}} {\emph{package}}` & \{\{colspan=2\}\}Shows package metadata, summary, description, etc.\{\{nl\}\}(same as `rpm -qpi`, but package doesn't have to be installed) & \tn % Row Count 11 (+ 10) % Row 2 \SetRowColor{LightBackground} `{\bf{dnf provides}} {\emph{/file}}` & \{\{colspan=2\}\}Shows what software package provides the file\{\{nl\}\}(same as `rpm -qf`, but package doesn't have to be installed) & \tn % Row Count 20 (+ 9) % Row 3 \SetRowColor{white} `{\bf{dnf search '}}{\emph{gui{\bf{}}'}}` & \{\{colspan=2\}\}Searches for "{\emph{gui}}" based on package name \& metadata & \tn % Row Count 25 (+ 5) % Row 4 \SetRowColor{LightBackground} \{\{nobreak\}\}`{\bf{dnf search all '}}{\emph{gui{\bf{}}'}}` & \{\{colspan=2\}\}Includes package description when searching for "{\emph{gui}}" & \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.66 cm} x{2.66 cm} x{2.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Managing Software Packages (DNF) (cont)}} \tn % Row 5 \SetRowColor{LightBackground} `{\bf{dnf list '}}{\emph{x*{\bf{}}'}}` & \{\{colspan=2\}\}Lists all available and/or installed software packages that begin with "{\emph{x}}" & \tn % Row Count 7 (+ 7) % Row 6 \SetRowColor{white} `{\bf{dnf group list}}` & \{\{colspan=2\}\}Shows list of available software groups\{\{nl\}\}("Environment Groups" = logical groupings of regular groups from "Available" list) & \tn % Row Count 17 (+ 10) % Row 7 \SetRowColor{LightBackground} `{\bf{dnf group info "}}{\emph{Name{\bf{}}"}}` & \{\{colspan=2\}\}Lists software packages included in specified group & \tn % Row Count 22 (+ 5) % Row 8 \SetRowColor{white} `{\bf{dnf history}}` & \{\{colspan=2\}\}Displays history of DNF \seqsplit{commands/actions} & \tn % Row Count 26 (+ 4) % Row 9 \SetRowColor{LightBackground} `{\bf{dnf history undo}} {\emph{3}}` & \{\{colspan=2\}\}Undoes number {\emph{3}} from DNF history\{\{nl\}\}(e.g. if it installed something, "undo" will uninstall it) & \tn % Row Count 34 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.66 cm} x{2.66 cm} x{2.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Managing Software Packages (DNF) (cont)}} \tn % Row 10 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{\{\{colspan=3\}\}{\bf{Download/Install Commands:}}} \tn % Row Count 1 (+ 1) % Row 11 \SetRowColor{white} `{\bf{dnf download \{\{nl\}\} -{}-resolve}} {\emph{package}}` & \{\{colspan=2\}\}Downloads software package \& its dependencies {\bf{without}} installing them & \tn % Row Count 8 (+ 7) % Row 12 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{dnf install}} {\emph{package}}` & \{\{colspan=2\}\}Installs package \& automatically resolves dependencies & \tn % Row Count 13 (+ 5) % Row 13 \SetRowColor{white} & `{\bf{-y}}` & auto-{\bf{y}}es (for \seqsplit{non-interactive)} \tn % Row Count 16 (+ 3) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 16 (+ 0) % Row 15 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{dnf remove}} {\emph{package}}` & \{\{colspan=2\}\}Uninstalls package \& any dependencies ({\bf{if}} they aren't being used elsewhere) & \tn % Row Count 23 (+ 7) % Row 16 \SetRowColor{LightBackground} & `{\bf{-y}}` & auto-{\bf{y}}es (for \seqsplit{non-interactive)} \tn % Row Count 26 (+ 3) % Row 17 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 26 (+ 0) % Row 18 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{dnf update}} {\emph{package}}` & \{\{colspan=2\}\}Redownloads .rpm file \& reinstalls newer version & \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.66 cm} x{2.66 cm} x{2.28 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Managing Software Packages (DNF) (cont)}} \tn % Row 19 \SetRowColor{LightBackground} & `{\bf{-y}}` & auto-{\bf{y}}es (for \seqsplit{non-interactive)} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Page Break}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Info Commands}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{ip -br addr}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows current IP \& netmask for all interfaces & \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} `{\bf{ip link show}}` & \{\{ac\}\}\{\{colspan=2\}\}Link-level properties of all interfaces\{\{nl\}\}(MAC addresses, etc.) & \tn % Row Count 12 (+ 7) % Row 2 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{ip address show}}` & \{\{ac\}\}\{\{colspan=2\}\}Equivalent of `ipconfig`\{\{nl\}\}(same info as `link show`, plus IP addresses) & \tn % Row Count 20 (+ 8) % Row 3 \SetRowColor{white} & `{\bf{ip a s}}` & abbreviated form \tn % Row Count 22 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 22 (+ 0) % Row 5 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{ip route show}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows default route & \tn % Row Count 25 (+ 3) % Row 6 \SetRowColor{LightBackground} & `{\bf{ip r s}}` & abbreviated form \tn % Row Count 27 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 27 (+ 0) % Row 8 \SetRowColor{LightBackground} `{\bf{ping}}` | `{\bf{ping6}}` & \{\{ac\}\}\{\{colspan=2\}\}IPv4 ping | IPv6 ping & \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Info Commands (cont)}} \tn % Row 9 \SetRowColor{LightBackground} \{\{nobreak\}\}`{\bf{tracepath}}`\{\{nl\}\}`{\bf{tracepath6}}` & \{\{ac\}\}\{\{colspan=2\}\}Equivalent of `tracert`/`traceroute`\{\{nl\}\}IPv6 version & \tn % Row Count 6 (+ 6) % Row 10 \SetRowColor{white} `{\bf{mtr}} {\emph{address}}` & \{\{ac\}\}\{\{colspan=2\}\}"My traceroute" program; gives extra info \& continuous running stats & \tn % Row Count 13 (+ 7) % Row 11 \SetRowColor{LightBackground} `{\bf{nmap -sS}} {\emph{host}}` & \{\{ac\}\}\{\{colspan=2\}\}Scans ports on host; shows port number/type, open state, associated service, etc. & \tn % Row Count 21 (+ 8) % Row 12 \SetRowColor{white} \{\{rowspan=6\}\}`{\bf{ss}}` & \{\{ac\}\}\{\{colspan=2\}\}{\bf{S}}ockets {\bf{s}}tate information & \tn % Row Count 25 (+ 4) % Row 13 \SetRowColor{LightBackground} & `{\bf{-p}}` & {\bf{p}}rocesses responsible for opening ports \tn % Row Count 29 (+ 4) % Row 14 \SetRowColor{white} & `{\bf{-l}}` & {\bf{l}}istening sockets \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Info Commands (cont)}} \tn % Row 15 \SetRowColor{LightBackground} & `{\bf{-u}}` & {\bf{U}}DP sockets \tn % Row Count 2 (+ 2) % Row 16 \SetRowColor{white} & `{\bf{-n}}` & translates names to {\bf{n}}umbers\{\{nl\}\}(e.g. process name + PID) \tn % Row Count 7 (+ 5) % Row 17 \SetRowColor{LightBackground} & `{\bf{-t}}` & {\bf{T}}CP sockets \tn % Row Count 9 (+ 2) % Row 18 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 9 (+ 0) % Row 19 \SetRowColor{LightBackground} `{\bf{nmcli connection show}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows configured connection profiles & \tn % Row Count 14 (+ 5) % Row 20 \SetRowColor{white} & `{\bf{nmcli c s}}` & abbreviated form \tn % Row Count 16 (+ 2) % Row 21 \SetRowColor{LightBackground} & `{\bf{-{}-active}}` & only show currently active profiles \tn % Row Count 19 (+ 3) % Row 22 \SetRowColor{white} `{\bf{nmcli dev status}}` & \{\{ac\}\}\{\{colspan=2\}\}Status of interfaces (devices), incl. type \& profile name & \tn % Row Count 25 (+ 6) % Row 23 \SetRowColor{LightBackground} `{\bf{nmcli dev show}} {\emph{int}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows settings applied to the specified interface (device) & \tn % Row Count 31 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Configuration Commands (NMCLI)}} \tn % Row 0 \SetRowColor{LightBackground} \{\{rowspan=7\}\}`{\bf{nmcli con add \textless{}{\emph{specs}}\textgreater{}}}\{\{nl\}\} {\emph{{[}options{]}}}` & \{\{ac\}\}\{\{colspan=2\}\}Create a new connection profile\{\{nl\}\}{\bf{\textless{}specs\textgreater{}}} = required configs\{\{nl\}\}{\emph{{[}options{]}}} = other optional configs & \tn % Row Count 10 (+ 10) % Row 1 \SetRowColor{white} & `\textless{}{\bf{con-name "}}{\emph{Name{\bf{}}"}}\textgreater{}` & profile name \tn % Row Count 13 (+ 3) % Row 2 \SetRowColor{LightBackground} & `\textless{}{\bf{type}} {\emph{ethernet}}\textgreater{}` & type of connection \tn % Row Count 15 (+ 2) % Row 3 \SetRowColor{white} & `\textless{}{\bf{ifname}} {\emph{eth0}}\textgreater{}` & interface to associate with profile \tn % Row Count 18 (+ 3) % Row 4 \SetRowColor{LightBackground} & \{\{nobreak\}\}`{[}{\bf{ipv4.method {\emph{manual}}}}{]}` & specifies manual IPv4 address config\{\{nl\}\}(default=auto; only needed for manual) \tn % Row Count 25 (+ 7) % Row 5 \SetRowColor{white} & \{\{ar\}\}`{[}{\bf{ipv4.addresses }}\{\{nl\}\} {\emph{address/cidr}}{]}` & manually set IPv4 address \& subnet \tn % Row Count 29 (+ 4) % Row 6 \SetRowColor{LightBackground} & `{[}{\bf{ipv4.dns}} {\emph{x.x.x.x}}{]}` & specify DNS server address \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Network Configuration Commands (NMCLI) (cont)}} \tn % Row 7 \SetRowColor{LightBackground} \{\{rowspan=4\}\}`{\bf{nmcli con mod "}}{\emph{Name{\bf{}}"}}` & \{\{ac\}\}\{\{colspan=2\}\}Modify properties of a connection profile & \tn % Row Count 5 (+ 5) % Row 8 \SetRowColor{white} & `{\bf{ipv4.gateway}} {\emph{x.x.x.x}}` & set IPv4 default gateway \tn % Row Count 8 (+ 3) % Row 9 \SetRowColor{LightBackground} & \{\{ar\}\}`{\bf{+}}{\emph{property{\bf{.}}attribute \{\{nl\}\} value}}` & add a value to an array of values\{\{nl\}\}(e.g. add an IP address to list of addresses) \tn % Row Count 15 (+ 7) % Row 10 \SetRowColor{white} & \{\{ar\}\}`{\bf{-}}{\emph{property{\bf{.}}attribute \{\{nl\}\} value}}` & remove a value from an array of values \tn % Row Count 19 (+ 4) % Row 11 \SetRowColor{LightBackground} `{\bf{nmcli con up "}}{\emph{Name{\bf{}}"}}` & \{\{ac\}\}\{\{colspan=2\}\}Activates specified profile on whatever interface it's configured for & \tn % Row Count 26 (+ 7) % Row 12 \SetRowColor{white} `{\bf{nmcli con reload \{\{nl\}\} "}}{\emph{Name{\bf{}}"}}` & \{\{ac\}\}\{\{colspan=2\}\}Reloads profile after config changes\{\{nl\}\}{\bf{Note:}} Must re-`{\bf{up}}` profile before new config will be applied to interface! & \tn % Row Count 37 (+ 11) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{SSH}} \tn % Row 0 \SetRowColor{LightBackground} \{\{nobreak\}\}\{\{rowspan=6\}\}`{\bf{ssh}} {\emph{user{\bf{}}@}}{\emph{ip.addr}}` & \{\{ac\}\}\{\{colspan=2\}\}Start ssh connection & \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} & `{\bf{-v}}` & verbose; shows in detail what's happening while establishing connection \tn % Row Count 11 (+ 6) % Row 2 \SetRowColor{LightBackground} & `{\bf{-Y}}` & enables graphical application support \tn % Row Count 14 (+ 3) % Row 3 \SetRowColor{white} & `{\bf{-p}} {\emph{port\#}}` & connect to ssh service not listening on default port 22 \tn % Row Count 19 (+ 5) % Row 4 \SetRowColor{LightBackground} & `{\bf{-i}} {\emph{keyfile}}` & reads private key from identity file for public key authentication\{\{nl\}\}(not part of lecture; added from Google search when it came up in the quiz) \tn % Row Count 31 (+ 12) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{SSH (cont)}} \tn % Row 5 \SetRowColor{LightBackground} & \{\{nobreak\}\}`{\bf{-o}} {\emph{option}} {\emph{dest\_server}}`\{\{nl\}\}\{\{nl\}\}Example:\{\{nl\}\}`PreferredAuthenti\{\{nl\}\}cations=password` & configures options when connecting to specified destination\{\{nl\}\}(Example: require a password; can use commas to specify multiple) \tn % Row Count 10 (+ 10) % Row 6 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 10 (+ 0) % Row 7 \SetRowColor{LightBackground} \{\{rowspan=2\}\}`{\bf{ssh-keygen}}` & \{\{ac\}\}\{\{colspan=2\}\}Generates a \seqsplit{public/private} key pair & \tn % Row Count 15 (+ 5) % Row 8 \SetRowColor{white} & `{\bf{-N}} '' {\bf{-f}} {\emph{filename}}` & generates key pair without extra prompts\{\{nl\}\}(`''` = no passphrase; `-f` specifies non-default file location) \tn % Row Count 24 (+ 9) % Row 9 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 24 (+ 0) % Row 10 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{ssh-copy-id}} {\emph{user@ip}}` & \{\{ac\}\}\{\{colspan=2\}\}Installs public key on destination server & \tn % Row Count 29 (+ 5) % Row 11 \SetRowColor{LightBackground} & `{\bf{-i}} {\emph{filepath}}` & specifies which public key to install \tn % Row Count 32 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.052 cm} x{2.812 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Misc. Commands}} \tn % Row 0 \SetRowColor{LightBackground} `{\bf{whatis}} {\emph{command}}` & \{\{ac\}\}\{\{colspan=2\}\}Displays a short, one-line summary of what the command does & \{\{br=2\}\}\{\{bb=2\}\} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} `{\bf{file}} {\emph{something}}` & \{\{ac\}\}\{\{colspan=2\}\}Tells you what kind of file "{\emph{something}}" is\{\{nl\}\}(More reliable than file extension) & \tn % Row Count 14 (+ 8) % Row 2 \SetRowColor{LightBackground} `{\bf{echo}}` & \{\{ac\}\}\{\{colspan=2\}\}Creates output (`print` = Python equivalent) & \tn % Row Count 19 (+ 5) % Row 3 \SetRowColor{white} \{\{rowspan=4\}\}`{\bf{date}}` & \{\{ac\}\}\{\{colspan=2\}\}Displaying, setting, calculating...\{\{nl\}\}basically all things date-related & \{\{width=80\}\} \tn % Row Count 26 (+ 7) % Row 4 \SetRowColor{LightBackground} & `{\bf{+\%F}}` & display current date in international format (YYYY-mm-dd) \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.052 cm} x{2.812 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Misc. Commands (cont)}} \tn % Row 5 \SetRowColor{LightBackground} & `{\bf{+\%R}}` & display current time (24-hr clock) \tn % Row Count 3 (+ 3) % Row 6 \SetRowColor{white} & `{\bf{+\%s}}` & display \# of seconds since epoch \tn % Row Count 6 (+ 3) % Row 7 \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 6 (+ 0) % Row 8 \SetRowColor{white} `{\bf{hostname}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows the hostname of the current system. That is all. & \tn % Row Count 12 (+ 6) % Row 9 \SetRowColor{LightBackground} `{\bf{host}} {\emph{hostname}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows IP address associated with specified hostname & \tn % Row Count 17 (+ 5) % Row 10 \SetRowColor{white} \{\{rowspan=2\}\}`{\bf{hostnamectl}}` & \{\{ac\}\}\{\{colspan=2\}\}Shows properties of current system (hostname, OS, kernel, etc.) & \tn % Row Count 23 (+ 6) % Row 11 \SetRowColor{LightBackground} & \{\{ar\}\}`{\bf{set-hostname}} \{\{nl\}\} {\emph{new\_name}}` & sets hostname to "{\emph{new\_name}}" \tn % Row Count 26 (+ 3) % Row 12 \SetRowColor{white} \mymulticolumn{3}{x{8.4cm}}{} \tn % Row Count 26 (+ 0) % Row 13 \SetRowColor{LightBackground} \{\{rowspan=3\}\}`{\bf{sos report}}` & \{\{ac\}\}\{\{colspan=2\}\}Generates an SOS report & \tn % Row Count 29 (+ 3) % Row 14 \SetRowColor{white} & `{\bf{-l}}` & lists available plugins for SOS\{\{nl\}\}(recommended to pipe to `less`) \tn % Row Count 34 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.052 cm} x{2.812 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Misc. Commands (cont)}} \tn % Row 15 \SetRowColor{LightBackground} & `{\bf{-{}-upload}}` & automatically associates generated report with your Red Hat account\{\{nl\}\}(enables browsing the data via the web portal) \tn % Row Count 9 (+ 9) % Row 16 \SetRowColor{white} `{\bf{sleep}} {\emph{seconds}}` & \{\{ac\}\}\{\{colspan=2\}\}Does nothing for specified time\{\{nl\}\}(used for scripting) & \tn % Row Count 15 (+ 6) % Row 17 \SetRowColor{LightBackground} `{\bf{tmux}}` & \{\{ac\}\}\{\{colspan=2\}\}Splits terminal window into multiple separate panes {\emph{(I think)}} & \tn % Row Count 21 (+ 6) % Row 18 \SetRowColor{white} `{\bf{gnome-characters}}` & \{\{ac\}\}\{\{colspan=2\}\}Opens window of gnome icons/emotes & \tn % Row Count 25 (+ 4) % Row 19 \SetRowColor{LightBackground} `{\bf{gnome-calculator}}` & \{\{ac\}\}\{\{colspan=2\}\}Opens built-in calculator (like Windows) & \tn % Row Count 30 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}