\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{WBrandes} \pdfinfo{ /Title (linux-system-administration.pdf) /Creator (Cheatography) /Author (WBrandes) /Subject (Linux System Administration 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{Linux System Administration Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{WBrandes} via \textcolor{DarkBackground}{\uline{cheatography.com/89603/cs/20393/}}} \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}WBrandes \\ \uline{cheatography.com/wbrandes} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 24th September, 2019.\\ Updated 4th December, 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}{p{0.64078 cm} x{2.56312 cm} x{1.3731 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Network Commands}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & \seqsplit{Parameter/Usage} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} wget & Downloads something from a web address & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} ssh & Remote login or command run & "ssh \seqsplit{username@server"} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} scp, sftp & Remote file copy & \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{openssl} & For generating stuff for encryption & \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{ssh-keygen} & For generating public/private key pairs & \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} dnf & Package manager for Fedora. Use it to download, update, and install all sorts of software & \tn % Row Count 17 (+ 5) % Row 7 \SetRowColor{white} \seqsplit{ifconfig} & Use without parameters to get general info on network connections. Also used for assigning IP addresses and setting up networking config stuff for interface devices & \tn % Row Count 25 (+ 8) % Row 8 \SetRowColor{LightBackground} \seqsplit{netmask} & Used for setting network submask & \tn % Row Count 27 (+ 2) % Row 9 \SetRowColor{white} route & For adding entries to a routing table & \tn % Row Count 29 (+ 2) % Row 10 \SetRowColor{LightBackground} \seqsplit{netstat} & For displaying network info & \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{p{0.64078 cm} x{2.56312 cm} x{1.3731 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Network Commands (cont)}} \tn % Row 11 \SetRowColor{LightBackground} ip & For Internet Protocol activities & \tn % Row Count 2 (+ 2) % Row 12 \SetRowColor{white} \seqsplit{traceroute} & Given an address, will identify all of the places your packets travel to to get to that address & \tn % Row Count 7 (+ 5) % Row 13 \SetRowColor{LightBackground} ping & Sends packets to an IP, seeing how long it takes to get a response & \tn % Row Count 10 (+ 3) % Row 14 \SetRowColor{white} dig & Queries DNS servers to get info on a domain & \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4577 cm} x{2.01388 cm} x{2.10542 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{System \& Disk Commands}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & Parameters \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} du & Disk usage; shows disk usage of files in directory & h: human readable. a: all files, not just directories \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} free & Shows amount of free \& and used memory in system & \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} df & Report on file system \& disk space usage & \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} lsblk & Report info about block devices & \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} fdisk & Manipulate disk partioning & l: list disks \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} Uname & Print system information & \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} \seqsplit{export} & For setting an environment variable & \tn % Row Count 20 (+ 3) % Row 8 \SetRowColor{LightBackground} \seqsplit{unmount} & Unmounts the specified disk & \tn % Row Count 22 (+ 2) % Row 9 \SetRowColor{white} eject & Ejects the specified disk & \tn % Row Count 24 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4577 cm} x{2.01388 cm} x{2.10542 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Common Commands}} \tn % Row 0 \SetRowColor{LightBackground} Name & Description & Parameters/Notes \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ls & list everything in given directory (default is present dir) & l: long, more detailed view. a: show all, even hidden files/directories \tn % Row Count 5 (+ 4) % Row 2 \SetRowColor{LightBackground} cd & navigate to another directory & \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} pwd & Present Working Directory; shows current directory & \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} cp & Copy a file from one place to another & \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} rm & Remove a file or directory & f: force remove, ignoring \seqsplit{warnings/anything.} r: recursive; use this to delete directories \tn % Row Count 18 (+ 5) % Row 6 \SetRowColor{LightBackground} mv & Moves a file & Can be used to rename files, by 'moving' a file to the same directory, with a different name \tn % Row Count 24 (+ 6) % Row 7 \SetRowColor{white} rmdir & Removes a directory & \tn % Row Count 26 (+ 2) % Row 8 \SetRowColor{LightBackground} mkdir & Creates a directory & -p to make parents; can build a chain of non-existent directories all at once \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{p{0.4577 cm} x{2.01388 cm} x{2.10542 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Common Commands (cont)}} \tn % Row 9 \SetRowColor{LightBackground} touch & Updates a file's last-edited date. & Can be used to create files- it will create a file if the given file does not exist \tn % Row Count 5 (+ 5) % Row 10 \SetRowColor{white} \seqsplit{history} & lists history of previous commands & \tn % Row Count 7 (+ 2) % Row 11 \SetRowColor{LightBackground} man & Lists manual page for a given command, that'll tell you alllll about what a command can do and how to use it & \tn % Row Count 14 (+ 7) % Row 12 \SetRowColor{white} \seqsplit{reboot} & Reboots the machine & \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Directories}} \tn % Row 0 \SetRowColor{LightBackground} Directory & Description \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} /etc & All sorts of system-wide configuration stuff \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{/proc/cpuinfo} & CPU info \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} /etc/passwd & User account info \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} /etc/group & Group info \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} /etc/shadow & Where passwords are actually kept \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} /etc/skel & Skeleton, template home directory for copying to make new home directories \tn % Row Count 12 (+ 3) % Row 7 \SetRowColor{white} \seqsplit{/etc/systemd/system} & Daemon config file / setup stuff \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{/etc/syslog.conf} & Configuration for syslog logging daemon \tn % Row Count 16 (+ 2) % Row 9 \SetRowColor{white} /var/log & Where logs are kept \tn % Row Count 17 (+ 1) % Row 10 \SetRowColor{LightBackground} /etc/hosts & Configuration for network hosts \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} \seqsplit{/etc/networks} & Configuration for networks \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4577 cm} x{2.19696 cm} x{1.92234 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Process Commands}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & \seqsplit{Parameters/Usage} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} top & Displays and updates lots of info on running processes & \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{prestres} & Displays current running processes as a tree & \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} fg & Foreground; resume a suspended process or bring one back from the foreground & fg \%{[}job number{]} or fg {[}process ID{]} \tn % Row Count 12 (+ 4) % Row 4 \SetRowColor{LightBackground} bg & Background; puts a process into the background & \tn % Row Count 15 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{3}{x{5.377cm}}{Note: if you want to put a currently running command in the background, use CTRL+Z, and then fg \& bg} \tn % Row Count 17 (+ 2) % Row 6 \SetRowColor{LightBackground} kill & Kills a command in the background & \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.77809 cm} x{3.02082 cm} p{0.77809 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Automation and Daemons}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & \seqsplit{Parameters} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{systemctl} & Managing systems/services, in particular daemons & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{journalctl} & part of systemd, can be used to see logging/errors for daemons & \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} \seqsplit{crontab} & Used for setting up automated running of commands / scripts at certain dates or intervals via cron & \tn % Row Count 11 (+ 4) % Row 4 \SetRowColor{LightBackground} at & For scheduling a command to run just once & \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} atq & Lists commands in the queue that have been scheduled to run & \tn % Row Count 16 (+ 3) % Row 6 \SetRowColor{LightBackground} atrm & Remove a command from the queue & \tn % Row Count 18 (+ 2) % Row 7 \SetRowColor{white} test & For checking files and values; any yes/no question about our system & \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.50347 cm} x{2.47158 cm} x{1.60195 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Input / Reading Commands}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & Parameters \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{locate} & For searching for files & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} find & For searching for files & \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} less & Text viewer for viewing large files & \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} nano & Good, simple text editor & \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} vim & Complex, powerful text editor & \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{vimtutor} & Used for learning vim & \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} cat & Concatenate files and print them to stdout & \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} echo & Echoes whatever it is given; useful for sending text somewhere & \tn % Row Count 19 (+ 3) % Row 9 \SetRowColor{white} head & Read first few lines of a file and print them to stdout & n: number of lines to read \tn % Row Count 22 (+ 3) % Row 10 \SetRowColor{LightBackground} tail & Read last few lines of a file and print them to stdout & n: number of lines to read \tn % Row Count 25 (+ 3) % Row 11 \SetRowColor{white} awk & Used for viewing files in complex ways, like looping through a file and only looking at certain patterns and columns/rows in a file & \tn % Row Count 32 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{p{0.50347 cm} x{2.47158 cm} x{1.60195 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Input / Reading Commands (cont)}} \tn % Row 12 \SetRowColor{LightBackground} dd & Reads bytes from a location & \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.64078 cm} x{3.15813 cm} p{0.77809 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Groups, Users, and Permissions oh my}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & \seqsplit{Parameters} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{passwd} & For changing and setting passwords & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{useradd} & For adding a new user & \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} su & Switch user & \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} \seqsplit{usermod} & Modify a user account & \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} chown & For changing ownership of a file / directory & \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} chmod & For changing permissions of a file / directory & \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} \seqsplit{groupadd} & Add a group & \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.24425 cm} x{3.73275 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Syntax \& Jargon}} \tn % Row 0 \SetRowColor{LightBackground} Symbol / Term & Description \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} stdin & Standard input; the input a command is looking to for what it should work with. Generally comes from keyboard; could be a file or something else, if we redirect stuff \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} stdout & Standard output; typically is the console. Can be changed to a file or something if we redirect it. \tn % Row Count 12 (+ 4) % Row 3 \SetRowColor{white} stderr & Standard error; where errors are printed to. \tn % Row Count 14 (+ 2) % Row 4 \SetRowColor{LightBackground} | & Pipe. Used to send output of one command directly to another like, "history | less" \tn % Row Count 17 (+ 3) % Row 5 \SetRowColor{white} \textgreater{} & Send output of command somewhere. \tn % Row Count 19 (+ 2) % Row 6 \SetRowColor{LightBackground} \textgreater{}\textgreater{} & Append output somewhere. \tn % Row Count 20 (+ 1) % Row 7 \SetRowColor{white} \textgreater{}\& or \&\textgreater{} & Send stdout and stderr somewhere \tn % Row Count 22 (+ 2) % Row 8 \SetRowColor{LightBackground} 2\textgreater{} & Send just stderr somewhere \tn % Row Count 23 (+ 1) % Row 9 \SetRowColor{white} 1\textgreater{} & Send just stdout somewhere \tn % Row Count 24 (+ 1) % Row 10 \SetRowColor{LightBackground} \& & Put at the end of a command to run it in the background, immediately returning console to you. \tn % Row Count 28 (+ 4) % Row 11 \SetRowColor{white} \$ & When on prompt, means that you're a regular user \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.24425 cm} x{3.73275 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Syntax \& Jargon (cont)}} \tn % Row 12 \SetRowColor{LightBackground} \# & When on prompt, means that you're the root user \tn % Row Count 2 (+ 2) % Row 13 \SetRowColor{white} ? & Wildcard character - when a command receives '?' in its input, it will take that mean to any single character \tn % Row Count 6 (+ 4) % Row 14 \SetRowColor{LightBackground} * & Wildcard for any number of characters. I.e. "*.txt" would refer to any thing/file ending in ".txt" \tn % Row Count 10 (+ 4) % Row 15 \SetRowColor{white} {[}abc{]} & Wildcard for given characters (here, a, b, or c). Can also define a range, i.e. {[}1-3{]} \tn % Row Count 13 (+ 3) % Row 16 \SetRowColor{LightBackground} CTRL+U & Delete current line \tn % Row Count 14 (+ 1) % Row 17 \SetRowColor{white} CTRL+C & Abort whatever's currently running \tn % Row Count 16 (+ 2) % Row 18 \SetRowColor{LightBackground} CTRL+Z & Suspend whatever's currently running \tn % Row Count 18 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4577 cm} x{2.05965 cm} x{2.05965 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Miscellaneous Commands}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Command} & Description & Parameters \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} yes & Spams a string until forcibly stopped & \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} sudo & Runs the given command as root & \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{shutdown} & Shuts down system & "shutdown now" to do it now \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} halt & Shuts down system & p: needed on most systems to power down hardware \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} \seqsplit{reboot} & Same as halt but reboots & \tn % Row Count 14 (+ 2) % Row 6 \SetRowColor{LightBackground} which & Finds if a command exists and where it is & \tn % Row Count 17 (+ 3) % Row 7 \SetRowColor{white} \seqsplit{whereis} & Like which but searches a broader area than just your shell's search path & \tn % Row Count 22 (+ 5) % Row 8 \SetRowColor{LightBackground} sort & Sorts text & r: reverses sort order. h: for sorting human-readable byte counts \tn % Row Count 26 (+ 4) % Row 9 \SetRowColor{white} ln & Used for creating links between files; shortcuts basically & \tn % Row Count 30 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{p{0.4577 cm} x{2.05965 cm} x{2.05965 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Miscellaneous Commands (cont)}} \tn % Row 10 \SetRowColor{LightBackground} chsh & Change shell & \tn % Row Count 1 (+ 1) % Row 11 \SetRowColor{white} stty & Setting key commands (like backspace to delete) & \tn % Row Count 4 (+ 3) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{(Use "stty sane" to unbork a borked shell)} \tn % Row Count 5 (+ 1) % Row 13 \SetRowColor{white} clear & Clears terminal of text & \tn % Row Count 7 (+ 2) % Row 14 \SetRowColor{LightBackground} \seqsplit{script} & Saves everything that comes up in your console, until exit is called & \tn % Row Count 11 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}