\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{iddd} \pdfinfo{ /Title (linux.pdf) /Creator (Cheatography) /Author (iddd) /Subject (Linux 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}{FFC338} \definecolor{LightBackground}{HTML}{FFF7E6} \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 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{iddd} via \textcolor{DarkBackground}{\uline{cheatography.com/197744/cs/41738/}}} \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}iddd \\ \uline{cheatography.com/iddd} \\ \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 15th December, 2023.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Need help?}} \tn % Row 0 \SetRowColor{LightBackground} man commandname & Open the help manual \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} apropos keyword & Searches the keyword inside the help manual \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} apropos -a keyword & Searches for multiple keywords inside the help manual \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} commandname -{}-help & Displays help for the command \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} whatis commandname & One line description of a command \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} linuxconf & Linux configuration \tn % Row Count 11 (+ 1) % Row 6 \SetRowColor{LightBackground} aspell & Spell checker \tn % Row Count 12 (+ 1) % Row 7 \SetRowColor{white} alias & To create simple commands \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\emph{ Alias example: alias armas ='grep -inT armas Um.txt' -{}-\textgreater{} This defines the command armas to execute the grep command. \newline \newline }} Typing only alias will display the already created commands \newline \newline {\emph{ Wildcards: }} (set of characters of arbitrary lenghts); ? (any character); {[}numbers{]} (range of characters)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic commands}} \tn % Row 0 \SetRowColor{LightBackground} whoami & To learn your username \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} clear & Clears the screen \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} exit & Exits the terminal \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} echo "randomwords" & Returns what you wrote \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} expr number + number & To perform basic math operations \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} date & Dipslays the date and time of the system \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} nano & Opens nano, the linux text editor \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} sqlite3 & Example of a vesion of sql to use from linux \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} soofice & See files on Libreoffice \tn % Row Count 14 (+ 1) % Row 9 \SetRowColor{white} gedit & Opens text/code editor Gedit \tn % Row Count 16 (+ 2) % Row 10 \SetRowColor{LightBackground} gedit filename & Opens the file on Gedit \tn % Row Count 17 (+ 1) % Row 11 \SetRowColor{white} cal & Displays the calender and easter date \tn % Row Count 19 (+ 2) % Row 12 \SetRowColor{LightBackground} seq & Prints a numeral sequence \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.38896 cm} x{2.58804 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Permissions}} \tn % Row 0 \SetRowColor{LightBackground} ls -l & Displays permissions to filesand directories \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} ls -la & Displays permissions to files and directories, including hidden files \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} chmod & Change permissions to files and directories \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} sudo & Temporarily grants elevated permissions \tn % Row Count 12 (+ 2) % Row 4 \SetRowColor{LightBackground} sudo useradd & Adds a user to the system \tn % Row Count 14 (+ 2) % Row 5 \SetRowColor{white} sudo useradd -g groupname username & Sets the user's default group \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} sudo userass -G group(s)name username & Adds the user to additional groups \tn % Row Count 18 (+ 2) % Row 7 \SetRowColor{white} sudo usermod & Modifies existing user accounts \tn % Row Count 20 (+ 2) % Row 8 \SetRowColor{LightBackground} sudo usermod -g & Changes thhe primary group \tn % Row Count 22 (+ 2) % Row 9 \SetRowColor{white} sudo usermo -G & Changes the secondary group \tn % Row Count 24 (+ 2) % Row 10 \SetRowColor{LightBackground} sudo usermode -d path username & Changes the user's home directory \tn % Row Count 26 (+ 2) % Row 11 \SetRowColor{white} sudo usermode -l & Changes the user login name \tn % Row Count 28 (+ 2) % Row 12 \SetRowColor{LightBackground} sudo usermod -L & Locks the account \tn % Row Count 29 (+ 1) % Row 13 \SetRowColor{white} sudo userdel & Deletes user \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.38896 cm} x{2.58804 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Permissions (cont)}} \tn % Row 14 \SetRowColor{LightBackground} sudo chown user/groupname file & Commands changes to the ownership of a file or directory \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Permissions in Linux look like drwxrwxrwx. 1st char is a d (for directory) or - (for regular files). The 3 sets refer to user-group-other.The options for characters are: u (indicats changes will be made to user permissions); g (indicates changes will be made to the group permissions), o (indicates changes will be made to other permissions); + (adds permissions to them); - (removes permissions from them); = (assigns permissions to them)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Directories \& Files}} \tn % Row 0 \SetRowColor{LightBackground} tree & Lists the directory conten on a tree format \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} pwd & Prints the current working directory path \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} ls & Displays the names of the directories and files in the current directory \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} ls -a & Displays hidden files \tn % Row Count 8 (+ 1) % Row 4 \SetRowColor{LightBackground} cd directoryname & Changes directory \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} cd / & Back to the root directory \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} cd \textasciitilde{} & Changes to the home directory \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} cd .. & Changes to the preceding directory \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} mkdir \seqsplit{newdirectoryname} & Create new directories \tn % Row Count 17 (+ 2) % Row 9 \SetRowColor{white} touch & Creates a new empty file \tn % Row Count 18 (+ 1) % Row 10 \SetRowColor{LightBackground} rmdir direcotyname & Delete directories \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} rmdir -r & Deletes the directory and files \tn % Row Count 22 (+ 2) % Row 12 \SetRowColor{LightBackground} rm filename & Deletes a file \tn % Row Count 23 (+ 1) % Row 13 \SetRowColor{white} cp {[}options{]} origin destiny & Copie files and directories \tn % Row Count 25 (+ 2) % Row 14 \SetRowColor{LightBackground} mv \seqsplit{file/directoryname} /path & Moves directories and files to a new location. Can also be used to rename files. \tn % Row Count 29 (+ 4) % Row 15 \SetRowColor{white} tar -xf filename & Extracts files \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Directories \& Files (cont)}} \tn % Row 16 \SetRowColor{LightBackground} stat filename & Displays info about an file \tn % Row Count 2 (+ 2) % Row 17 \SetRowColor{white} stat -f & Displays info about the system file (not the file) \tn % Row Count 5 (+ 3) % Row 18 \SetRowColor{LightBackground} find filename & To find a file \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{- Home directory: the one in which the session is started after login. \newline - Working directory: the one being used at the moment. \newline -Root directory: mother directory, first of the tree. \newline \newline {\emph{ " " are needed to have spaces on the directory name \newline \newline }}rmdir only works in empty directories \newline \newline {\emph{hidden files will have an . (dot) at the beggining \newline \newline }} stat can be used with multiple files (stat filename filename)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.74655 cm} x{4.23045 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Processes}} \tn % Row 0 \SetRowColor{LightBackground} top & Shows the executing processes on Linux \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} ps & Shows the active exeuting processes on the machine \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} ps -e & Lists all the processes in order \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} ps -f & Shows the same as ps but in a table \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} ps -e-f & Shows the processes in order, on a table \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} ps tree & Shows the processes in tree \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} kill & Ends the process \tn % Row Count 12 (+ 1) % Row 7 \SetRowColor{white} kill -9 & Is used when kill doesn't work \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} kill -1 & Restarts the process \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{* kill -9 and kill -1 can be combined (kill -9-1)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Networks}} \tn % Row 0 \SetRowColor{LightBackground} ping & Verify if an server is available \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{traceroute} & Shows the network route \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} nslookup & Lets you find info about the computer in the network through DNS \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} telnet & Log in securely on a remote computer \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} ssh -X & Log in securely on a remote computer \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{Xfce4-session} & Start an graphical session on a remote computer \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} exit & Leave the remote session \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} quit & Leave the remote session \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} who & Shows who has an active session on this machine \tn % Row Count 16 (+ 2) % Row 9 \SetRowColor{white} who -w & Know some more info \tn % Row Count 17 (+ 1) % Row 10 \SetRowColor{LightBackground} finger & Shows info about an user \tn % Row Count 18 (+ 1) % Row 11 \SetRowColor{white} write username & Send messages to other users \tn % Row Count 20 (+ 2) % Row 12 \SetRowColor{LightBackground} talk & Also used to communciate with other users. In this case, thy msut accept the connection with the same command \tn % Row Count 24 (+ 4) % Row 13 \SetRowColor{white} mesg n & Indicates that I don't want to receive more messages \tn % Row Count 26 (+ 2) % Row 14 \SetRowColor{LightBackground} mesg y & Indicates that I'm available \tn % Row Count 27 (+ 1) % Row 15 \SetRowColor{white} at & Schedules the execution of commands on the computer \tn % Row Count 29 (+ 2) % Row 16 \SetRowColor{LightBackground} scp & Securely copie files between different machines \tn % Row Count 31 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{- ping -c 4 apps .fe.up.pt \newline - nslookup moodle.up.pt or nslookup 193.137.35.211 \newline - telnet towel.clinkenlights.nl. \newline -ssh -X gnomo.fe.up-pt or ssh -X mccarthy.fe.up.pt \newline - at 11:15 commandstobeexecuted ctrl+d \newline -scp \seqsplit{user@mccarthy.fe.up.pt:/usr/SCCOM/ola.txt} copiado.txt \newline *when using write, use ctrl+c to send the message or use echo mensagem | write username} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Reading files content}} \tn % Row 0 \SetRowColor{LightBackground} cat filename & Concatenate and display the content of files \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} tac & Like cat but in reverse \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} grep filename & Returns all lines of a file that contain a specified string \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} head filename & Dispalys the first 10 lines of the file \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} head -number & Displays the n first lines \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} tail filename & Displays the last 10 lines \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} tail -number filename & Displays the last n number of lines \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} less & Displays the content of a file one page at a time \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} more filename & Displays the file \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} wc & Counts characters, words and lines \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} wc -c & Counts bytes \tn % Row Count 18 (+ 1) % Row 11 \SetRowColor{white} wc -m & Counts characters \tn % Row Count 19 (+ 1) % Row 12 \SetRowColor{LightBackground} wc -w & Counts words \tn % Row Count 20 (+ 1) % Row 13 \SetRowColor{white} nl & counts the number of lines \tn % Row Count 21 (+ 1) % Row 14 \SetRowColor{LightBackground} nl -a & numbers \tn % Row Count 22 (+ 1) % Row 15 \SetRowColor{white} sort & reorganizes the file by lines, so that they are ordered by number and alphabeticaly \tn % Row Count 26 (+ 4) % Row 16 \SetRowColor{LightBackground} sort -r & like sort but in reverse \tn % Row Count 27 (+ 1) % Row 17 \SetRowColor{white} grep -n & Prints all lines according to the condition and numerates them \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Reading files content (cont)}} \tn % Row 18 \SetRowColor{LightBackground} grep -t & All the lines will start on the same place \tn % Row Count 2 (+ 2) % Row 19 \SetRowColor{white} grep -i & Looks for the condition, ignoring the letter capitalization \tn % Row Count 5 (+ 3) % Row 20 \SetRowColor{LightBackground} grep -w & searches only for the complete word and not for words that contain part of the chosen word \tn % Row Count 9 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Joining commands}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{There are several ways to combine commands on a single line. \newline % Row Count 2 (+ 2) Running commands one after the other: ; or \&\& or ||. \newline % Row Count 4 (+ 2) \&\& If the command that preeceds \&\& completes sccessfully, the following is run. \newline % Row Count 6 (+ 2) || If the command that precedes || fails, the following runs. \newline % Row Count 8 (+ 2) Run more than one command concurrently (the output from the first command is piped to the next as the first command is runnign): | or a filter with a | \newline % Row Count 12 (+ 4) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 13 (+ 1) Using ; : cd mydir ; ls \newline % Row Count 14 (+ 1) Using \&\& : command \&\& command \newline % Row Count 15 (+ 1) Using || : command || command \newline % Row Count 16 (+ 1) Using | : history | grep "cp" (displays all the cp commands that are recorded among the 16 most recently recorded command in history file). ls -l | grep "Jan" (displays the files that were last changed in January). ps -e | grep cc | wc -l (lists all o the processes active in the system and pipes the output to grep, which searches for every instace of the string cc. The output of the grep is then piped to wc, which counts every line in which the string cc occurs and sends the number of lines to standard output). \newline % Row Count 27 (+ 11) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 28 (+ 1) \textgreater{} : redirects the output of a command to an file (the result of the command will appear on the file and not on the shell. When there's content on the file, it will repace it. When there's no file it will create a new one). \newline % Row Count 33 (+ 5) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Joining commands (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\textgreater{}\textgreater{}\textgreater{} : adds to the file% Row Count 1 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Administration}} \tn % Row 0 \SetRowColor{LightBackground} apt & Search for and install software packages \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} apt-get & Search for and install software packages \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} apt remove & Removes a package \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} apt upgrade & updats the whole system \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} apt update & Upgrades the repository \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{- It might be necessary to use sudo to use apt} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}