\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{Anthony.Dominguez} \pdfinfo{ /Title (learning-linux-command-line.pdf) /Creator (Cheatography) /Author (Anthony.Dominguez) /Subject (Learning Linux Command Line 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}{154273} \definecolor{LightBackground}{HTML}{F0F3F6} \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{Learning Linux Command Line Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Anthony.Dominguez} via \textcolor{DarkBackground}{\uline{cheatography.com/202519/cs/42984/}}} \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}Anthony.Dominguez \\ \uline{cheatography.com/anthony-dominguez} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 19th April, 2024.\\ Updated 10th April, 2024.\\ 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.128 cm} x{2.508 cm} x{2.964 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{General Command Syntax}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{ls}} & -ahl & /usr/bin \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{sort}} & -u & users.txt \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} {\bf{grep}} & -i "needle" & heystack \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{{\bf{Commands}} are programs that take a particular action \newline {\bf{Options}} tell the command {\emph{how}} to operate \newline {\bf{Arguments}} tell the command {\emph{what}} to operate on} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2 cm} x{6 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Finding Help for Commands}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{man}} & {\emph{argument}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\emph{argument}} & {\bf{-{}-help}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{apropos}} & \{\{nobreak\}\}{\emph{functionality search}} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.96 cm} x{5.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Useful Keyboard Shortcuts}} \tn % Row 0 \SetRowColor{LightBackground} {\emph{Tab}} & Tab completion \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\emph{Ctrl - A}} & Move to beginning of line \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\emph{Ctrl - E}} & Move to end of line \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} {\emph{Ctrl - Left arrow}} & Move left one word \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} {\emph{Ctrl - Rig arrow}} & Move right one word \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} {\emph{Ctrl - U}} & Delete from cursor to line start \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} {\emph{Ctrl - K}} & Delete from cursor to line end \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} {\emph{Ctrl - Shift - C}} & Copy selected text to clipboard \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} {\emph{Ctrl - Shift - V}} & Paste text from clipboard \tn % Row Count 15 (+ 2) % Row 9 \SetRowColor{white} {\emph{Up arrow}} & Recall previous command \tn % Row Count 16 (+ 1) % Row 10 \SetRowColor{LightBackground} {\emph{Down arrow}} & Scroll previous command \tn % Row Count 17 (+ 1) % Row 11 \SetRowColor{white} {\emph{Ctrl - R}} & Search command history \tn % Row Count 18 (+ 1) % Row 12 \SetRowColor{LightBackground} {\emph{Ctrl - C}} & Cancel command \tn % Row Count 19 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.368 cm} x{1.584 cm} x{1.872 cm} x{2.376 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Commands for File Information}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{file}} & & {\emph{argument}} & Determine file type \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{stat}} & & {\emph{argument}} & Display file status \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.4 cm} x{5.6 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Notable File System Directories}} \tn % Row 0 \SetRowColor{LightBackground} / & File system root \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} /home & User home directories \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} /root & Root user's home directory \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} /etc & Common configuration files \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} /bin, /sbin & Common programs or commands \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} /lib & Shared libraries and modules \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} /mnt, /media & Standard location for mounting other file systems \tn % Row Count 8 (+ 2) % Row 7 \SetRowColor{white} /dev, /proc, /sys & Kernel and system information \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.24 cm} x{5.76 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Paths in Linux}} \tn % Row 0 \SetRowColor{LightBackground} / & Absolute path \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} . & Current working directory \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} .. & Parent directory \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textasciitilde{} & Current user's home directory \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} \textbackslash{} - {\emph{space}} & Equivalent to space key \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{0.8 cm} x{7.2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{The File System}} \tn % Row 0 \SetRowColor{LightBackground} cd & Change the shell working directory \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} pwd & Print the name of File system root: / User home directories: /home Root user's home directory: /root \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{ls} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.008 cm} x{1.152 cm} x{1.368 cm} x{3.672 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{The File System}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{cd}} & {\emph{available}} & {\emph{new directory}} & Change the shell working directory \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{pwd}} & {\emph{available}} & & Print the name of the current working directory \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} {\bf{ls}} & -lh & {\emph{directory}} & List information about the files \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{0.864 cm} x{1.008 cm} x{2.304 cm} x{3.024 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Working with Directories and Files}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{mkdir}} & {\emph{available}} & {\emph{directory(ies)}} & Create the \seqsplit{directory(ies)Create} the directory(ies) \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} {\bf{rmdir}} & {\emph{available}} & {\emph{directory(ies)}} & Remove the directory(ies), if they are empty \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} {\bf{cp}} & {\emph{available}} & {\emph{source}} - {\emph{destination}} & Copy source to destination \tn % Row Count 13 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{mv}} & {\emph{available}} & {\emph{source}} - {\emph{destination}} & Move source to destination \tn % Row Count 16 (+ 3) % Row 5 \SetRowColor{white} {\bf{rm}} & -r & {\emph{file(s)}} & Remove the file(s) (recursively) \tn % Row Count 18 (+ 2) % Row 6 \SetRowColor{LightBackground} {\bf{find}} & -name & {\emph{directory}} - {\emph{"expression*?}} & Find directory or file by name \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.008 cm} x{1.224 cm} x{2.376 cm} x{2.592 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Search for Text}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{grep}} & {\emph{options}} & {\emph{"pattern*?}} {\emph{file name}} & Search for patterns in file \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.08 cm} x{1.296 cm} x{1.44 cm} x{3.384 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Tools for Text}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{cat}} & {\emph{available}} & {\emph{file name}} & Concatenate to standard output \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{head}} & {\emph{available}} & {\emph{file name}} & Print the first number of something \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{tail}} & {\emph{available}} & {\emph{file name}} & Print the last number of something \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.76 cm} x{6.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Tools for Working with Text}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{awk}} & Often used to extract specific text from a file according to rule \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{sed}} & Often used to modify text in a command pipeline or in place \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} {\bf{sort}} & Often used to sort text \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Vim and nano are very popular text editors in CLI} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.152 cm} x{1.368 cm} x{2.664 cm} x{2.016 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Hard and Symbolic Links}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{ln}} & -s & {\emph{source file}} {\emph{link name}} & Creates a soft link \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{ln}} & & {\emph{source file}} {\emph{link name}} & Creates a hard link \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}----} \SetRowColor{LightBackground} \mymulticolumn{4}{x{8.4cm}}{- A hard link points to specific data (by inode) on the disk \newline - A soft link or symbolic link (symlink) points to another file} \tn \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{0.792 cm} x{1.944 cm} x{1.44 cm} x{3.024 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{File Permissions}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{User}} & {\bf{Group}} & {\bf{Others}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} rwx & rwx & rwx & Up to three letters indicate the permissions for the file or directory \tn % Row Count 7 (+ 5) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{4}{x{8.4cm}}{} \tn % Row Count 7 (+ 0) % Row 3 \SetRowColor{white} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{chmod}} & {\emph{octal or symbolic change}} & {\emph{file or directory}} & Changes the mode of the file or directory \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} {\bf{chown}} & {\emph{new owner}} & {\emph{file or directory}} & Changes the owner of the file or directory \tn % Row Count 16 (+ 3) % Row 6 \SetRowColor{LightBackground} {\bf{chgrp}} & {\emph{new group}} & {\emph{file or directory}} & Changes the group of the file or directory \tn % Row Count 19 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}----} \SetRowColor{LightBackground} \mymulticolumn{4}{x{8.4cm}}{r: read (value of 4) \newline w: write (value of 2) \newline e: execute (value of 1) \newline \newline u: user \newline g: group \newline o: others \newline a: all \newline \newline Two methods to represent permissions: \newline - Octal (like 755, 644, 777) \newline - Symbolic (like a=r, g+w, and o-x)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{0.792 cm} x{0.936 cm} x{2.664 cm} x{2.808 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Tape Archives and Data Compression}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Option(s)}} & {\bf{Argument(s)}} & {\bf{Description}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{tar}} & -cvf & {\emph{file name}}.tar {\emph{directory}} & Creates a tape archive \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{tar}} & -caf & {\emph{file name}}.tar.gz/tar.bz2 {\emph{directory}} & Creates a compressed tape archive, the compression type depends on the extension \tn % Row Count 11 (+ 6) % Row 3 \SetRowColor{white} {\bf{tar}} & -xf & {\emph{file name}} -C {\emph{target directory}} & Extracts a compressed tape archive inside a certain directory \tn % Row Count 16 (+ 5) % Row 4 \SetRowColor{LightBackground} {\bf{zip}} & -r & {\emph{file name}} {\emph{directory to compress}} & Compresses a directory \tn % Row Count 19 (+ 3) % Row 5 \SetRowColor{white} {\bf{unzip}} & & {\emph{file name}} -d {\emph{target directory}} & Extracts a directory \tn % Row Count 22 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}----} \SetRowColor{LightBackground} \mymulticolumn{4}{x{8.4cm}}{Formats for compressed .tar files are: .tar.gz, .tgz, .tar.bz2} \tn \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.32 cm} x{5.68 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Superuser Rights}} \tn % Row 0 \SetRowColor{LightBackground} sudo + {\emph{command}} & Executes the command with superuser rights (requires user password) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} sudo + -s & Activates superuser rights for a period of time \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} sudo + -k & Gives up superuser rights \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.16 cm} x{5.84 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Environment Variables and PATH}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{env}} & Set some attributes in the environment \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{which}} & Locate a command \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \textasciitilde{}/.bash\_profile & Bash profile (create with command {\bf{nano}}) \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Inside nano, write: \newline PATH = "\$PATH : /my/custom/path : /some/other/path"} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.232 cm} x{0.936 cm} x{1.008 cm} x{3.024 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{Redirection}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Stream}} & {\bf{Number}} & {\bf{Usage}} & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Standard Input (stdin) & 0 & Text input & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Standard Output (stdout) & 1 & Text \seqsplit{output} & \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} Standard Error (stderr) & 2 & Error text & \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{4}{x{8.4cm}}{} \tn % Row Count 9 (+ 0) % Row 5 \SetRowColor{white} {\bf{{\emph{command}}}} & {\emph{number}}\textgreater{} & {\emph{file name}} & Redirects the output to the file \tn % Row Count 12 (+ 3) % Row 6 \SetRowColor{LightBackground} {\bf{{\emph{command}}}} & {\emph{number}}\textgreater{}\textgreater{} & {\emph{file name}} & Appends the output to the file \tn % Row Count 15 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.96 cm} x{5.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Information About Linux Distribution \& Hardware}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Command}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{ls}} -l /etc/*release & List of the files that contain information about the release \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{cat}} /etc/*release & Shows information about the two files in the release folder \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} {\bf{uname}} -a & Show information about Linux Kernel \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{uname}} -r & Shows only the version of the Linux Kernel \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} {\bf{free}} -h & Shows how much memory the system has \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} {\bf{cat}} /proc/cpuinfo & Shows how much CPU the system has \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} {\bf{lscpu}} & Shows more comprehensive information about the system's CPU \tn % Row Count 18 (+ 3) % Row 8 \SetRowColor{LightBackground} {\bf{df}} -h & Shows how much storage the system has \tn % Row Count 20 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.44 cm} x{4.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Install and Update Software}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{apt search}} {\emph{search}} & Looks for packages whose description match the search term \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{apt show}} {\emph{package}} & Displays information about the package \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{sudo apt update}} & Retrieve an updated list of the packages from the repositories before installing new software or upgrading the software package \tn % Row Count 11 (+ 6) % Row 3 \SetRowColor{white} {\bf{sudo apt install}} {\emph{package}} & Install the package \tn % Row Count 13 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{sudo apt upgrade}} & Upgrade the software package \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}