linux-cheat-sheet/linux-cheat-sheet.tex

119 lines
2.8 KiB
TeX
Raw Normal View History

\documentclass[8pt, letter, landscape]{extarticle}
\usepackage{extsizes}
2023-09-01 19:12:53 +00:00
\usepackage[
margin=0.5in,
top=2cm,
bottom=2cm
2023-09-01 19:12:53 +00:00
]{geometry}
\usepackage{lmodern}
2023-09-01 19:52:34 +00:00
\usepackage{titlesec}
\titleformat{\section}[display]
{\large\scshape}{\thesection}{}{\hrule\vspace{3pt}}{}
2023-09-01 19:12:53 +00:00
\usepackage{enumitem}
\setlist[description]{
style=nextline,
font={\bfseries\ttfamily},
itemsep=0pt,
parsep=0pt
2023-09-01 19:12:53 +00:00
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\textbf{A Linux Cheat Sheet}}
\fancyhead[R]{\texttt{https://git.kjodle.net/kjodle/linux-cheat-sheet}}
\fancyfoot[R]{Page \thepage}
2023-09-01 19:12:53 +00:00
\usepackage{multicol}
\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{1cm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shadows}
% See https://tex.stackexchange.com/questions/5226/keyboard-font-for-latex
\newcommand*\keystroke[1]{%
\tikz[baseline=(key.base)]
\node[%
draw,
fill=white,
drop shadow={shadow xshift=0.4ex,shadow yshift=-0.2ex,fill=black,opacity=0.35},
rectangle,
rounded corners=2pt,
inner xsep=3pt,
inner ysep=0.5pt,
line width=0.5pt,
font=\footnotesize\ttfamily
](key) {#1\strut}
;
}
\begin{document}
\begin{multicols*}{4}
2023-09-01 19:12:53 +00:00
2023-09-01 19:52:34 +00:00
\section*{Directory}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[cd] Change the current directory
\item[cd..] Move one directory up
\item[cd-] Move to your previous directory
\item[pwd] Show the current directory (relative to \texttt{\$HOME})
\item[scp <file.text> <server/file.txt>] Securely copy a specific file to a server directory
\item[mkdir] Create a new directory
\item[rmdir] Delete an empty directory
\item[rsyng -a </path/to/file> </file>] Synchronize the contents of a specific direcotry with a backup directory
\end{description}
2023-09-01 19:52:34 +00:00
\section*{Disk Usage}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[df] Get a report on the system's disk space usage
\item[du] Check the disk space usage of a file or directory
\item[du -ah] Show disk usage for all files and directories in human readable sizes
\item[du -sh] Show disk usage of the current directory
\item[fdisk -l] Show disk partitions, sizes, and types
\item[findmnt] Show target mount point for all filesystems
\end{description}
2023-09-01 19:52:34 +00:00
\section*{File}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[ls] List files in a directory
\item[ls -R] List all files in all subdirectories
\item[ls -a] List hidden files
\item[ls -l] List detailed information in a tabular format
\end{description}
2023-09-01 19:52:34 +00:00
\section*{System}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[]
\end{description}
2023-09-01 19:52:34 +00:00
\section*{Network}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[]
\end{description}
2023-09-01 19:52:34 +00:00
\section*{User}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[]
\end{description}
2023-09-01 19:52:34 +00:00
\section*{Keyboard Shortcuts}
2023-09-01 19:12:53 +00:00
\begin{description}
\item[\keystroke{ctrl} + \keystroke{e}]Move to the end of the line
\end{description}
\end{multicols*}
\end{document}