\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{nhatlong0605} \pdfinfo{ /Title (lfcs-module4-operatingrunningsystems.pdf) /Creator (Cheatography) /Author (nhatlong0605) /Subject (LFCS\_Module4\_OperatingRunningSystems 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}{FF4D52} \definecolor{LightBackground}{HTML}{FFF3F4} \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{LFCS\_Module4\_OperatingRunningSystems Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{nhatlong0605} via \textcolor{DarkBackground}{\uline{cheatography.com/68292/cs/17215/}}} \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}nhatlong0605 \\ \uline{cheatography.com/nhatlong0605} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 25th September, 2018.\\ Updated 6th April, 2020.\\ 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} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Boot order}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/nhatlong0605_1537858731_Capture.JPG}}} \tn \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}{Process Properties w/ ps}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{PID-VCZ-RSS-TTY} & Process ID-Virtual Memory Size-Residence Memory Size-Console Process running on \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} ps aux | grep sshd & Find SSHD service running on system \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} ps -ef | less (PPID) & Parent Process ID \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{ps -e -o pid,args -{}-forest} \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.23965 cm} x{2.73735 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Process Properties w/ ps}} \tn % Row 0 \SetRowColor{LightBackground} PID-VCZ-RSS-TTY & Process ID-Virtual Memory Size-Residence Memory Size-Console Process running on \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} ps aux | grep sshd & Find SSHD service running on system \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} ps -ef | less (PPID) & Parent Process ID \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} ps -e -o pid,args -{}-forest | less & Show relation between parent and child processes \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} ps aux -{}-sort pmem & Sorting process memory \tn % Row Count 12 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Systemd}} \tn % Row 0 \SetRowColor{LightBackground} /usr/lib/systemd & Main config dir \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} systemctl -t help & List available unit types \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} ls \seqsplit{/usr/lib/systemd/system/*socket} & List available socket service \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} Socket: ListenStream=22 & Listen on TCP port 22 \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Service can be dead and socket can still listening, reducing resource to run service} \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} systemctl show sshd = man systemd.directives & List all options can be included in service \tn % Row Count 12 (+ 3) % Row 6 \SetRowColor{LightBackground} systemctl set-property httpd.service MemoryLimit=500m & Modify unit file htttpd \tn % Row Count 15 (+ 3) % Row 7 \SetRowColor{white} Target & Group of unit file \tn % Row Count 16 (+ 1) % Row 8 \SetRowColor{LightBackground} systemctl get-default & Default targart \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} systemctl set-default multi-user.target & Set default to multi.user \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{When boot \seqsplit{systemd.unit=rescue.target}} \tn % Row Count 21 (+ 1) % Row 11 \SetRowColor{white} systemctl list-units & List all current units \tn % Row Count 23 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Linux Log}} \tn % Row 0 \SetRowColor{LightBackground} Make dir "journal" in /var/log & make journal consistently \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} vim \seqsplit{/etc/systemd/journald}.conf & change storage=auto to make journalctl consistently \tn % Row Count 5 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.73735 cm} x{2.23965 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Managing Shell Jobs}} \tn % Row 0 \SetRowColor{LightBackground} sleep 600 then Ctrl+Z or sleep 600 \& & Start job in background \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} fg & Move last bg job to foreground \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} jobs & Show current jobs \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Cron jobs}} \tn % Row 0 \SetRowColor{LightBackground} /etc/cron.d/ & Main dir to put file for scheduling (used by rpm) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} minute hour dayofmonth month dayofweek username command & Crontab syntax \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} crontab -e & Open crontab for current user \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} {\emph{/10 }} {\emph{ }} 1-5 /bin/logger & Run logger every 10 minute on weekdays \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} cat /var/log/cron | grep CRON & Verify schedule cron jobs \tn % Row Count 12 (+ 2) \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}{Libraries, RPM}} \tn % Row 0 \SetRowColor{LightBackground} ldd \seqsplit{/usr/bin/passwd} & Show all libraries the command need \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} rpm -qa | grep httpd & List all installed packages (query all) and see if httpd is installed \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} rpm -qi httpd & Provide info about package \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} rpm -ql http & Provide list of files installed from package \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} rpm -qc httpd & List configuration file (c) \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} rpm -qd httpd & List documentation about package (d) \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} rpm -qpi filename & Provide info about uninstalled package \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} rpm -qp -{}-scripts filename & Find which scripts are executed if package is installed \tn % Row Count 18 (+ 3) % Row 8 \SetRowColor{LightBackground} rpm -qf /etc/nanorc & Find out which package the file coming from \tn % Row Count 20 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Configuring GRUB2 Boot Loader}} \tn % Row 0 \SetRowColor{LightBackground} Press ESC after boot & Stop booting process \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Rescue kernel & Boot w/ minimal modules \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Press e & Edit \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} Take out "rhgb" "quiet" & See what's happen upon boot \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} Edit /etc/default/grub & Permanent boot modifications \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{/boot/grub2/grub.cfg} & Determine everything when system boot \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} grub2-mkconfig -o \seqsplit{/boot/grub2/grub.cfq} & Write a new GRUB config \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} \seqsplit{systemd.unit=rescue.target} & Start booting at rescue mode \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{systemd.unit=emergency.target} & Boot at minimal \tn % Row Count 17 (+ 2) % Row 9 \SetRowColor{white} mount -o remount,rw / & Put root file system in read,write mode \tn % Row Count 19 (+ 2) % Row 10 \SetRowColor{LightBackground} rd.break & Break in boot procedure at the end of init params \tn % Row Count 22 (+ 3) % Row 11 \SetRowColor{white} chroot /sysroot & Set root file system to /sysroot \tn % Row Count 24 (+ 2) % Row 12 \SetRowColor{LightBackground} echo b \textgreater{} \seqsplit{/proc/sysrq-trigger} & Crash and reset \tn % Row Count 26 (+ 2) % Row 13 \SetRowColor{white} touch .autorelabel & on CentOS \tn % Row Count 27 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.23965 cm} x{2.73735 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Rsyslog}} \tn % Row 0 \SetRowColor{LightBackground} systemctl status rsyslog & Check status of Rsyslog \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{vim /etc/rsyslog.conf} \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} facility & authpriv, kern, mail \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} priority & .emerg, .crit, .debug \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} kern.* /dev/console & Log from kern with all priority written to /dev/console \tn % Row Count 8 (+ 3) % Row 5 \SetRowColor{white} mail.* -/var/log/maillog & Written not in realtime (-) \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} {\emph{.emerg :omusrmsg:}} & Every user will receive emergency messsage on console \tn % Row Count 13 (+ 3) % Row 7 \SetRowColor{white} *.crit /var/log/critical & Save message with critical priority or higher to /var/log/critical \tn % Row Count 16 (+ 3) % Row 8 \SetRowColor{LightBackground} logger -p crit Critical Situation & Write log with crit priority \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\seqsplit{/etc/cron.daily/logrotate}} \tn % Row Count 19 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{logrotate.conf} \tn % Row Count 20 (+ 1) \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}{Install software}} \tn % Row 0 \SetRowColor{LightBackground} tar xvf filename -C /tmp & Decompress tar file verbose (v), x (extract) f(file) to /tmp dir \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} file filename & Find info about compressed file \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} gunzip {\emph{filename}} & Decompress file \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} tar czvf etc.tar /etc/ & Create tarball (c) and compress (z) \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} gunzip {\emph{filename}} & Unzip file \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} -p & preserver permission while decompress, compress \tn % Row Count 13 (+ 2) \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}{Process Signals}} \tn % Row 0 \SetRowColor{LightBackground} Within top, press k & PID, 15(sigterm) \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} kill 14053 & Kill process 14053 \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} killall dd & Kill all process w/name dd \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} kill -9 14321 & Kill process 14321 w/ signal 9 (kill) \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} kill \$(pidof dd) & Kill all dd process, similar to killall \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} kill -l & List of kill signal \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SELinux Booleans}} \tn % Row 0 \SetRowColor{LightBackground} getsebool -a & List of all current booleans \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} setsebool \seqsplit{ftpd\_anon\_write} on & Switch on to anonymous writing on ftp \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SELinux}} \tn % Row 0 \SetRowColor{LightBackground} getenforece & Current mode of SELinux \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} setenforce Permissive & Change to Permissive mode \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} cd \seqsplit{/etc/sysconfig/selinux} & Disable or enable SELinux \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.53827 cm} x{2.43873 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Systemd timers, at}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{/usr/lib/systemd/system} & Dir for unit file and timers \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} systemctl status atd & Check at daemon status \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} at 11:00, Ctrl+d to start job & start job at 11 \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} atq & Current jobs running w/ at \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} atrm {\emph{jobnumber}} & Remove job \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SELinux Labels}} \tn % Row 0 \SetRowColor{LightBackground} man semanage-fcontext & man page for setting context \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} semanage fcontext -a -t \seqsplit{httpd\_sys\_content\_t} "/web(/.*)?" & Setting SELinux to allow Apache read from /web \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{ls -lZd /web} \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{restorecon -Rv /web} \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} semanage port -a -t http\_port\_t -p tcp 444 & Allow Apache listen to port 444 \tn % Row Count 10 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.58804 cm} x{2.38896 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SEAlert}} \tn % Row 0 \SetRowColor{LightBackground} less /var/log/messages & Look for sealert \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} sealrt -l {\emph{code}} & Troubleshoot sealert \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Kernel Modules}} \tn % Row 0 \SetRowColor{LightBackground} lsmod | less & List modules \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} modprobe cdrom & Load cdrom module \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} modinfo cdrom & Info about module \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{/etc/modprobe.d} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} echo options cdrom autoclose=1 \textgreater{} cdrom.conf & Create cdrom.conf to automatically apply option \tn % Row Count 7 (+ 3) % Row 5 \SetRowColor{white} /proc & Interface to modify linux kernel \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} echo 1 \textgreater{} \seqsplit{/proc/sys/ipv6/conf/all/disable\_ipv6} & Disable ipv6 on runtime \tn % Row Count 12 (+ 3) % Row 7 \SetRowColor{white} echo \seqsplit{net.ipv6.conf.all.disable\_ipv6} = 1 \textgreater{} \seqsplit{etc/sysctl.d/ipv6.conf} & Disable ipv6 persistently \tn % Row Count 16 (+ 4) % Row 8 \SetRowColor{LightBackground} sysctl -a & List all tools \tn % Row Count 17 (+ 1) \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}{Yum}} \tn % Row 0 \SetRowColor{LightBackground} yum search {\emph{pacckage}} & Search for package \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} yum info {\emph{package}} & Info about package \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} yum provides */filename & Provide package info \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} yum remove {\emph{package}} & Remove package \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} yum downloader {\emph{package}} & Download the package to analyse \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} yum list & Get information about package \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} yum install & Install from the repo \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} yum update & Compare packages and update if suitable \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Process Priority}} \tn % Row 0 \SetRowColor{LightBackground} RT & Real time process, part of the kernel \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{Within top, press r} \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} nice -n 5 dd if/dev/zero of=/dev/null \& & Run dd command with nice value of 5 and priority of 25 \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} renice -n 5 14053 & Change priority of process id 14053 \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Changing top Display Properties}} \tn % Row 0 \SetRowColor{LightBackground} Press f & Changing top window and sorting \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Press z & Color top window \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Press W & Write to config file \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Managing Processes}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/nhatlong0605_1537825032_Screenshot from 2018-09-25 09-36-46.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Load average: last min, last 5 mins, last 15 mins \newline Press 1 to see number of CPU cores \newline Zombie task: Tasks lost communication w/ parent process \newline CPU: US process started by users, SY process relay directly to hardware, ni (nice) process w/ adjusted priority, id (idle) CPU time, wa(waiting) for harddisk. \newline S for status, R for running, S for sleeping \newline VIRT virtual mem, RES resident mem process really using, SHR sharing mem to share with other processes \newline top -u student: process started by user} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}