\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{Zappmax} \pdfinfo{ /Title (linux-troubleshooting.pdf) /Creator (Cheatography) /Author (Zappmax) /Subject (Linux Troubleshooting 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}{1762A3} \definecolor{LightBackground}{HTML}{F0F5F9} \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 Troubleshooting Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Zappmax} via \textcolor{DarkBackground}{\uline{cheatography.com/177608/cs/37062/}}} \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}Zappmax \\ \uline{cheatography.com/zappmax} \\ \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 26th May, 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} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Access Troubleshooting}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Server not reachable}} \newline % Row Count 1 (+ 1) `\#ping servername` \newline % Row Count 2 (+ 1) if no sucess search for IP for "servername" with \newline % Row Count 3 (+ 1) `\#nslookup servername` \newline % Row Count 4 (+ 1) `\#ping IP-Servername` \newline % Row Count 5 (+ 1) If IP-servername is pingable check: \newline % Row Count 6 (+ 1) `/etc/host` \newline % Row Count 7 (+ 1) `/etc/resolv.conf` \newline % Row Count 8 (+ 1) `/etc/nsswitch.conf` \newline % Row Count 9 (+ 1) If IP-servername is not pingable \newline % Row Count 10 (+ 1) ping another server with name and ip \newline % Row Count 11 (+ 1) Check if your machine has ip-adress `\#ip -c -b a \newline % Row Count 12 (+ 1) get gateway-ip with `\#netstat -rnv` and check destination 0.0.0.0 to gateway-ip \newline % Row Count 14 (+ 2) ping gateway -ip \newline % Row Count 15 (+ 1) check local physics cable etc. \newline % Row Count 16 (+ 1) \{\{nl\}\} \newline % Row Count 17 (+ 1) {\bf{App or website not reachable}} \newline % Row Count 18 (+ 1) ping servername and server-ip \newline % Row Count 19 (+ 1) if success connect to service `\#telnet ip port` \newline % Row Count 20 (+ 1) if not success login into server check services eg. `\#ps -ef |grep -i network` \newline % Row Count 22 (+ 2) or `\#systemctl status \textless{}service\textgreater{}` or `'systemctl -{}-failed` \newline % Row Count 24 (+ 2) {\bf{Cannot ssh as root/user}} \newline % Row Count 25 (+ 1) check if root is not permittet `\#/etc/ssh/sshd\_conf` \newline % Row Count 27 (+ 2) check `\#less /var/log/secure` \newline % Row Count 28 (+ 1) no user or nologin shell \newline % Row Count 29 (+ 1) check `\#id \textless{}user\textgreater{}` \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Access Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{check `\#less /etc/passwd` \newline % Row Count 1 (+ 1) {\bf{Firewall}} \newline % Row Count 2 (+ 1) check `\#service iptables status` \newline % Row Count 3 (+ 1) or check `\#systemctl status iptables.service` \newline % Row Count 4 (+ 1) or check `\#ps -ef|grep iptable` \newline % Row Count 5 (+ 1) or check `\#systemctl status firewalld` \newline % Row Count 6 (+ 1) try to temp disable firewall `\#systemctl disable firewalld` \newline % Row Count 8 (+ 2) {\bf{Terminal or Client is not working}} \newline % Row Count 9 (+ 1) check correct port user and password syntax% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Filesystem Troubleshooting}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{If you cannot CD into Dir or cannot open file or run a script}} \newline % Row Count 2 (+ 2) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 3 (+ 1) Dir/file not existing \newline % Row Count 4 (+ 1) check path relative or absolute \newline % Row Count 5 (+ 1) check permissions \newline % Row Count 6 (+ 1) check file type \newline % Row Count 7 (+ 1) check parent dir permissons \newline % Row Count 8 (+ 1) check for hidden dir \newline % Row Count 9 (+ 1) \{\{nl\}\} \newline % Row Count 10 (+ 1) {\bf{Trouble to find files or dir}} \newline % Row Count 11 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 12 (+ 1) command find or locate \newline % Row Count 13 (+ 1) correct syntax: `\#find /path - type {[}d,f{]} -name 'my\_dir' or 'my\_file'` \newline % Row Count 15 (+ 2) file/dir exits? \newline % Row Count 16 (+ 1) \{\{nl\}\} \newline % Row Count 17 (+ 1) {\bf{Cannot create links}} \newline % Row Count 18 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-- \newline % Row Count 19 (+ 1) which type of link hard or symbolic \newline % Row Count 20 (+ 1) syntax source first then target \newline % Row Count 21 (+ 1) check permissions \newline % Row Count 22 (+ 1) source or target file/dir missing or not existing \newline % Row Count 23 (+ 1) \{\{nl\}\} \newline % Row Count 24 (+ 1) {\bf{Cannot write to a file}} \newline % Row Count 25 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 26 (+ 1) check if it exists \newline % Row Count 27 (+ 1) check abs or rel path \newline % Row Count 28 (+ 1) file type \newline % Row Count 29 (+ 1) check parent dir permissions \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Filesystem Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{check for hidden file \newline % Row Count 1 (+ 1) check for file is open by an another user \newline % Row Count 2 (+ 1) run `\#getfacl` \newline % Row Count 3 (+ 1) \{\{nl\}\} \newline % Row Count 4 (+ 1) {\bf{Cannot Move/Rename/Delete/Copy file}} \newline % Row Count 5 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 7 (+ 2) check if it exists \newline % Row Count 8 (+ 1) check abs or rel path \newline % Row Count 9 (+ 1) file type \newline % Row Count 10 (+ 1) check parent dir permissions \newline % Row Count 11 (+ 1) check for hidden file \newline % Row Count 12 (+ 1) command syntax `\#mv; cp; "Source then Target"` \newline % Row Count 13 (+ 1) \{\{nl\}\} \newline % Row Count 14 (+ 1) {\bf{Cannot change file permissions/ownership}} \newline % Row Count 15 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 16 (+ 1) check if file exists \newline % Row Count 17 (+ 1) check abs. or rel path \newline % Row Count 18 (+ 1) check file ownership (user and group) \newline % Row Count 19 (+ 1) check Permissions \newline % Row Count 20 (+ 1) check parent dir permissions \newline % Row Count 21 (+ 1) check for hidden file \newline % Row Count 22 (+ 1) command syntax: `\#chown or chmod (user then file)` \newline % Row Count 24 (+ 2) command with recursive option -R \newline % Row Count 25 (+ 1) only root can change the file ownership \newline % Row Count 26 (+ 1) \{\{nl\}\} \newline % Row Count 27 (+ 1) {\bf{Cannot view others users files}} \newline % Row Count 28 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 29 (+ 1) check if file exists \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Filesystem Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{check abs. or rel path \newline % Row Count 1 (+ 1) check file ownership (user and group) \newline % Row Count 2 (+ 1) check Permissions \newline % Row Count 3 (+ 1) check parent dir permissions \newline % Row Count 4 (+ 1) check for hidden file \newline % Row Count 5 (+ 1) command syntax \newline % Row Count 6 (+ 1) only root can view any files \newline % Row Count 7 (+ 1) \{\{nl\}\} \newline % Row Count 8 (+ 1) {\bf{Cannot change password}} \newline % Row Count 9 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 10 (+ 1) check if file exists \newline % Row Count 11 (+ 1) check abs. or rel path \newline % Row Count 12 (+ 1) check file ownership (user and group) \newline % Row Count 13 (+ 1) check Permissions \newline % Row Count 14 (+ 1) check parent dir permissions \newline % Row Count 15 (+ 1) check for hidden file \newline % Row Count 16 (+ 1) check command syntax: \#passw \textless{}user\textgreater{}` \newline % Row Count 17 (+ 1) only root can change pw of any user \newline % Row Count 18 (+ 1) \{\{nl\}\} \newline % Row Count 19 (+ 1) {\bf{Disk space full}} \newline % Row Count 20 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 21 (+ 1) ckeck : `\#df -h` \newline % Row Count 22 (+ 1) check HD status: `\#badblocks -v /dev/DISK` or `/dev/sda` \newline % Row Count 24 (+ 2) check `\#iostat` \newline % Row Count 25 (+ 1) \{\{nl\}\} \newline % Row Count 26 (+ 1) {\bf{Delete old files}} \newline % Row Count 27 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 28 (+ 1) command: `\#rm` \newline % Row Count 29 (+ 1) syntax: \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Filesystem Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`find /path/to/files -type f -name '*.examples' -mtime +30 -exec rm \{\} \textbackslash{};` \newline % Row Count 2 (+ 2) \{\{nl\}\} \newline % Row Count 3 (+ 1) {\bf{Filesystem is corrupted}} \newline % Row Count 4 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 5 (+ 1) filesystem partitions: `/var`; `/etc`; `/root`; `/home` \newline % Row Count 7 (+ 2) check file system : `\#df` , `\#fdisk -l` \newline % Row Count 8 (+ 1) check logs in `/var/log/messages` or `/var/log/syslog` \newline % Row Count 10 (+ 2) run `\#fsck` on block device (eg /dev/sda) not on mount point \newline % Row Count 12 (+ 2) unmount filesystem the run `\#fsck` \newline % Row Count 13 (+ 1) \{\{nl\}\} \newline % Row Count 14 (+ 1) {\bf{Corrupted /etc/fstab}} \newline % Row Count 15 (+ 1) -{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}-{}- \newline % Row Count 16 (+ 1) check filesystem: `\#df` \newline % Row Count 17 (+ 1) cat or `\#less /etc/fstab` \newline % Row Count 18 (+ 1) system not booting: incorrect entry in fstab or fstab deleted \newline % Row Count 20 (+ 2) Steps to do: \newline % Row Count 21 (+ 1) *boot in rescue mode mounting a cd or cd-iso image \newline % Row Count 23 (+ 2) *choose option 1 to mount root fs \newline % Row Count 24 (+ 1) *fix the `etc/fstab file` \newline % Row Count 25 (+ 1) *for deleted file run `\#blkid` \newline % Row Count 26 (+ 1) \{\{nl\}\}% Row Count 27 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Administration Troubleshooting}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Out of memory}} \newline % Row Count 1 (+ 1) `\#free -m -h` \newline % Row Count 2 (+ 1) `\#top` \newline % Row Count 3 (+ 1) `\#vmstat` \newline % Row Count 4 (+ 1) `\#dmesg |grep -i "Out of memory" ` (/var/log/messages or /var/log/syslog) \newline % Row Count 6 (+ 2) check `\#/etc/sysctl.conf` \newline % Row Count 7 (+ 1) {\bf{Add Swap Memory}} \newline % Row Count 8 (+ 1) `\$df -h` \newline % Row Count 9 (+ 1) `\#dd if=/dev/zero of=/newswap bs=1M count=1024 ` \newline % Row Count 10 (+ 1) `\#free -m` \newline % Row Count 11 (+ 1) `\#chmod 600 newswap` \newline % Row Count 12 (+ 1) `\#mkswap /newswap` \newline % Row Count 13 (+ 1) `\#swapon /newswap` \newline % Row Count 14 (+ 1) change ftsab to: /newswap swap swap defaults 0 0 \newline % Row Count 15 (+ 1) {\bf{Delete Swap space}} \newline % Row Count 16 (+ 1) `\#swapoff /newswap` \newline % Row Count 17 (+ 1) `\#rm /newswap` \newline % Row Count 18 (+ 1) `\#free -m` \newline % Row Count 19 (+ 1) change your fstab file \newline % Row Count 20 (+ 1) {\bf{System rebooted or process is restarting}} \newline % Row Count 21 (+ 1) `\#systemctl status \textless{}process\textgreater{}` \newline % Row Count 22 (+ 1) `\#uptime` \newline % Row Count 23 (+ 1) `\#top` \newline % Row Count 24 (+ 1) `\#dmesg` \newline % Row Count 25 (+ 1) `\#iostat -xz 1` \newline % Row Count 26 (+ 1) `\#journalctl` \newline % Row Count 27 (+ 1) Check system logs: /var/log/messages /var/log/syslog /var/log/boot.log \newline % Row Count 29 (+ 2) Check app logs \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Administration Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Unable to receive an IP Address}} \newline % Row Count 1 (+ 1) check DHCP Server \newline % Row Count 2 (+ 1) check network virtual setting \newline % Row Count 3 (+ 1) `\#check network hardware setting` \newline % Row Count 4 (+ 1) lspci | egrep -i 'eth|wifi|wireless' \newline % Row Count 5 (+ 1) `\#nmcli -p dev` \newline % Row Count 6 (+ 1) `\#ip -h -c address` \newline % Row Count 7 (+ 1) `\#ifup \textless{}interface\textgreater{} ifconfig up \textless{}interface\textgreater{}` \newline % Row Count 8 (+ 1) `\#systemctl restart network` \newline % Row Count 9 (+ 1) check config files \seqsplit{/etc/sysconfig/network-scripts/ifcfg-enp0s3} or ifcfg-eth0 \newline % Row Count 11 (+ 2) {\bf{IP assigned but no reachability}} \newline % Row Count 12 (+ 1) check to which network you are connected to use ifconfig or ip a \newline % Row Count 14 (+ 2) ping your gateway \newline % Row Count 15 (+ 1) `\#netstat -rnv` \newline % Row Count 16 (+ 1) `\#ethtool or mii-tool` \newline % Row Count 17 (+ 1) `\#ifup \textless{}interface\textgreater{}` \newline % Row Count 18 (+ 1) `\#systemctl resart network` \newline % Row Count 19 (+ 1) `\#ifconfig or ip -4 \textless{}-6\textgreater{} -c add` \newline % Row Count 20 (+ 1) try to turn off temporarely the firewall \newline % Row Count 21 (+ 1) {\bf{What if can't run a specific command}} \newline % Row Count 22 (+ 1) check permission and ownership \newline % Row Count 23 (+ 1) check abs. and rel. path \newline % Row Count 24 (+ 1) `\#echo \$PATH` \newline % Row Count 25 (+ 1) check for missing or nit installed sw \newline % Row Count 26 (+ 1) `\#whereis \textless{}sw\textgreater{}` \newline % Row Count 27 (+ 1) `\#yum provides \textless{}packet\textgreater{} or dnf` \newline % Row Count 28 (+ 1) `\#yum seach telnet` \newline % Row Count 29 (+ 1) {\bf{Password not changeable}} \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Administration Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{check file /etc/passwd \newline % Row Count 1 (+ 1) and /etc/shadow( pwconv will recreate file) \newline % Row Count 2 (+ 1) user exists correct written ? \newline % Row Count 3 (+ 1) be root \newline % Row Count 4 (+ 1) `\#passwd \textless{}user\textgreater{}` \newline % Row Count 5 (+ 1) after changes in /etc/shadow use pwconv (PW of each \newline % Row Count 7 (+ 2) user has to set again) \newline % Row Count 8 (+ 1) {\bf{User has no home dir}} \newline % Row Count 9 (+ 1) dir not existing \newline % Row Count 10 (+ 1) dir exists but no entry in /etc/passwd \newline % Row Count 11 (+ 1) check permission ,ownership and spelling of dir \newline % Row Count 12 (+ 1) {\bf{Change words in files}} \newline % Row Count 13 (+ 1) use vi: :1,\$s/oldword/newword/ \newline % Row Count 14 (+ 1) use sed: \newline % Row Count 15 (+ 1) `\#sed -i 's/oldsring/newstring/g' \textless{}filename\textgreater{}` \newline % Row Count 16 (+ 1) {\bf{sed command}} \newline % Row Count 17 (+ 1) tbd \newline % Row Count 18 (+ 1) {\bf{Kill Process, User, Terminal}} \newline % Row Count 19 (+ 1) Find process ID (PID) `\#ps -ef` \newline % Row Count 20 (+ 1) `\#kill \textless{}PID\textgreater{}` \newline % Row Count 21 (+ 1) `\#kill -9 \textless{}pid\textgreater{}` brutal kill \newline % Row Count 22 (+ 1) `\#pkill \textless{}process name\textgreater{}` \newline % Row Count 23 (+ 1) `\#killall \textless{}process name\textgreater{}` \newline % Row Count 24 (+ 1) `{\bf{ root pw recovery}}` \newline % Row Count 25 (+ 1) restart computer (physical console access nessesary) \newline % Row Count 27 (+ 2) edit grub, search for `ro` change to: \newline % Row Count 28 (+ 1) `rw init=/sysroot/bin/sh` \newline % Row Count 29 (+ 1) press \textless{}ctrl x\textgreater{} \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Administration Troubleshooting (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{system reboots in single user mode \newline % Row Count 1 (+ 1) `\textgreater{}passwd root' \newline % Row Count 2 (+ 1) `\textgreater{}change pw` \newline % Row Count 3 (+ 1) `\textgreater{}touch /.autorelable' \newline % Row Count 4 (+ 1) `\textgreater{}exit` \newline % Row Count 5 (+ 1) reboot \newline % Row Count 6 (+ 1) {\bf{ logged in users}} \newline % Row Count 7 (+ 1) `\#last` \newline % Row Count 8 (+ 1) {\bf{ System running slow}} \newline % Row Count 9 (+ 1) Check disk space (df -h and du) \newline % Row Count 10 (+ 1) Check processing (top, free, lsmem, cat /proc/meminfo, vmstat, \newline % Row Count 12 (+ 2) pmap \textless{}PID\textgreater{}, dmidecode, lscpu, /proc/cpuinf) \newline % Row Count 13 (+ 1) Check disk issues (iostat -y 5, lsof) \newline % Row Count 14 (+ 1) Check networking (tcpdump -i \textless{}interface\textgreater{} , lsof -i -P -n |grep -i listen, \newline % Row Count 16 (+ 2) netstat -plnt or ss -plnt, iftop) \newline % Row Count 17 (+ 1) Check uptime (uptime) \newline % Row Count 18 (+ 1) Check logs \newline % Row Count 19 (+ 1) check hw status log into system \newline % Row Count 20 (+ 1) Other external tools (htop, itop, iptraf, psacct) \newline % Row Count 21 (+ 1) {\bf{Rollback updates and patches}} \newline % Row Count 22 (+ 1) Package or patch \newline % Row Count 23 (+ 1) `\#dnf history ` \newline % Row Count 24 (+ 1) `\#dnf history undo \textless{}id\textgreater{} ` \newline % Row Count 25 (+ 1) Update (upgrade does not workold obsolete packages are lost) \newline % Row Count 27 (+ 2) `\#dnf history undo \textless{}id\textgreater{}`% Row Count 28 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{System Recovery}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Additional Knowledge and Tools}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}