\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{Emre Aydınsoy (emretxt)} \pdfinfo{ /Title (linux-komutlari-cheat-sheet.pdf) /Creator (Cheatography) /Author (Emre Aydınsoy (emretxt)) /Subject (Linux Komutlari 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 Komutlari Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Emre Aydınsoy (emretxt)} via \textcolor{DarkBackground}{\uline{cheatography.com/139945/cs/29641/}}} \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}Emre Aydınsoy (emretxt) \\ \uline{cheatography.com/emretxt} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 1st November, 2021.\\ Updated 1st November, 2021.\\ 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.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Sistem Bilgileri}} \tn % Row 0 \SetRowColor{LightBackground} uname -a & Linux sistem bilgilerini getirir. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} uname -r & Linux kernel bilgilerini getirir. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} uptime & Sistemin ne kadar zamandir ayakta oldugu bilgisini getirir. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} last reboot & Sistemin reboot kayitlarini getirir. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} date & Tarihi g{\"o}sterir. \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} whoami & Hangi kullanici ile login olundugunu g{\"o}sterir. \tn % Row Count 11 (+ 2) \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}{Sistem Değişkenleri}} \tn % Row 0 \SetRowColor{LightBackground} env & Sistemde kayitli olan degiskenleri g{\"o}sterir. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} echo \seqsplit{\$VAR\_NAME} & VAR\_NAME isimli değişkene atanmış değişkeni g{\"o}sterir. \tn % Row Count 5 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Boru Komutları (Pipes | )}} \tn % Row 0 \SetRowColor{LightBackground} cmd1|cmd2 & cm1'in cıktısını cmd2'ye aktarır. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} cat devops.txt | grep egitim & devops.txt dosyasini ekrana basilacak iceriginden egitim kelimesini g{\"o}sterir. \tn % Row Count 6 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Boru komut y{\"o}ntemi, bir komutun çıktısını diğer komuta aktarir.} \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}{Dosya ve Dizin Komutlari}} \tn % Row 0 \SetRowColor{LightBackground} pwd & Hangi dizinde oldugunuzun bilgisini ekrana basar. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} ls & Dizin içeriğini listeler. \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} ls -lah & Dizin içereğini ekrana sıralı sekilde gizli dosya ve klasorlerle birlikte listeler. \tn % Row Count 9 (+ 4) % Row 3 \SetRowColor{white} cd & Bulunulan dizinden kullanicinin home klasorune gider. \tn % Row Count 12 (+ 3) % Row 4 \SetRowColor{LightBackground} cd \textless{}dir\textgreater{} & Yazilan dizin icerisine gider. \tn % Row Count 14 (+ 2) % Row 5 \SetRowColor{white} mkdir \textless{}dir\textgreater{} & Dizin yaratir yoksa, varsa hata verir. \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} mkdir -p \textless{}dir\textgreater{} & Dizin yaratir varsa yaratmaz ekrana hata basmaz. \tn % Row Count 18 (+ 2) % Row 7 \SetRowColor{white} cat \textless{}file\textgreater{} & Dosya icerigini ekrana basar. \tn % Row Count 20 (+ 2) % Row 8 \SetRowColor{LightBackground} cp \textless{}src-dosya\textgreater{} \textless{}dest-dosya\textgreater{} & kopyalama komutudur. \tn % Row Count 22 (+ 2) % Row 9 \SetRowColor{white} rm \textless{}dosya.txt\textgreater{} & silme komutudur. \tn % Row Count 23 (+ 1) % Row 10 \SetRowColor{LightBackground} ln -s \textless{}src\textgreater{} \textless{}dest\textgreater{} & Dosya kisayolu olusturma/linkleme komutudur. \tn % Row Count 25 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Donanım Komutları}} \tn % Row 0 \SetRowColor{LightBackground} cat \seqsplit{/proc/cpuinfo} & CPU bilgilerini ekrana basar. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} free -h & Kullanilan RAM bilgisini ve boştaki ram bilgisini ekrana basar. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} df -h & Disk durumunu ekrana basar. \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} du -sh & Bulunulan dizinin disk bilgilerini, diskte ne kadar yer kapladigini gosterir. \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} lsusb -tv & USB cihazlarini ekrana basar. \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Proses Y{\"o}netimi}} \tn % Row 0 \SetRowColor{LightBackground} ps & Aktif proseslerin hepsini ekrana basar. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} top & Çalışan prosesleri ekranda g{\"o}sterir. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} htop & top komutunun gelişmiş halidir. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} kill \textless{}pid\textgreater{} & Numarasi girilen proses id'sini {\"o}ldürür. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} nohup \textless{}proses,file, service\textgreater{} & Arka planda proses çalıştırır. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} fg & Arka planda çalışan son proses'i ekrana getirir. \tn % Row Count 13 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Sıkıştırma Komutları}} \tn % Row 0 \SetRowColor{LightBackground} tar cf dizin.tar dizin & dizin isimli klasoru dizir.tar seklinde sıkıştırir. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} tar tf dizin.tar & dizin isimli sıkıştırılmış dosyanin icerigini goruntuler. \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} tar xf dizin.tar & dizin.tar sıkıştırılmış dosyanin genisletir, unzipler. \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{tar parametleri}}} \tn % Row Count 10 (+ 1) % Row 4 \SetRowColor{LightBackground} c & arsiv yaratir. \tn % Row Count 11 (+ 1) % Row 5 \SetRowColor{white} t & tablo icerikleri \tn % Row Count 12 (+ 1) % Row 6 \SetRowColor{LightBackground} x & ayiklama/açma \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} v & ayrintili sekilde \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} f & dizin/dosya ismi \tn % Row Count 15 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SSH (Secure Shell)}} \tn % Row 0 \SetRowColor{LightBackground} ssh user@host & Uzak sunucuya/Host'a user ile bağlanma komutu. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} ssh -p \textless{}port\textgreater{} user@host & Uzak sunucuya SSH portu harici(22) port ile baglanma komutu. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} ssh-copy-id user@host & Uzak sunucuya ilgili user'in key'ini kopyalama komutu. Bu komut sonrasi ssh komutu parola veya key istemez. \tn % Row Count 10 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Network Komutları}} \tn % Row 0 \SetRowColor{LightBackground} ping host & Ilgili host'a ping atar, ilgili bilgileri ekrana basaar. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} whois domain.com & domain.com'un whois bilgilerini getirir. \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} dig domain.com & domain.com'un DNS bilgilerini getirir. \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} wget \textless{}file\textgreater{} or \textless{}url\textgreater{} & ilgili url'den dosya indirir. \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.64701 cm} x{4.32999 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Kısayollar}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{CTRL+C} & Runtime'da calisan komutu durdurur. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{CTRL+A} & Satir basina gider. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{CTRL+W} & Terminalden bir kelime siler sola doğru. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} cd - & cd ile gidilmiş sondan bir {\"o}nceki dizine gider. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} exit & Ilgili session'u sonlandırır. \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{CTRL+R} & Terminal history'sinde komut aramaya yarar. \tn % Row Count 11 (+ 2) \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}{Komut Y{\"o}netimi}} \tn % Row 0 \SetRowColor{LightBackground} man \textless{}komut\textgreater{} & Ilgili komut için yardım sayfası açar. \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text Dosya Işlemleri}} \tn % Row 0 \SetRowColor{LightBackground} nano \textless{}dosya.txt\textgreater{} & dosya.txt dosyasini basit bir editor ile acar, yoksa dosya.txt yaratilir. \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} vi \textless{}dosya.txt\textgreater{} & dosya.txt dosyasini vi editoru ile acar, yoksa dosya.txt yaratilir. \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} cat \textless{}dosya.txt\textgreater{} & dosya.txt icerigini ekrana yazdirir. \tn % Row Count 9 (+ 2) % Row 3 \SetRowColor{white} tail -f \textless{}dosya.txt\textgreater{} & dosya.txt iceriginin sonunu ekrana yazdirir ve yeni gelecek icerigi de ekrena basmaya devam eder. \tn % Row Count 14 (+ 5) % Row 4 \SetRowColor{LightBackground} tail -n 100 \textless{}dosya.txt\textgreater{} & dosya.txt isimli dosyanin son 100 satirini ekrana basar. \tn % Row Count 17 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}