Skip to content

Commit 1cf2b8c

Browse files
committed
More about software
1 parent 977c252 commit 1cf2b8c

File tree

1 file changed

+74
-26
lines changed

1 file changed

+74
-26
lines changed

presentation/linux_bash_metacentrum_course.tex

Lines changed: 74 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,20 +2170,25 @@ \subsection{Loops}
21702170
21712171
\section{Software}
21722172
2173-
\begin{frame}{Package management}
2174-
\begin{itemize}
2175-
\item Package -- an application or its part (documentation, plug-ins, translations, \ldots)
2176-
\item Packages are available in repositories on the internet
2173+
\begin{frame}[allowframebreaks]{Package management}{Installation of software}
21772174
\begin{itemize}
2178-
\item System has list of applications available
2179-
\item Updates, bug fixes are installed for all applications using one interface (GUI or command line) -- very reliable
2180-
\item Packages are digitally signed -- security
2181-
\item User can set custom repositories to get new packages
2175+
\item Package -- an application or its part (documentation, plug-ins, translations, \ldots)
2176+
\item Packages are available in repositories (directories) on the internet
2177+
\begin{itemize}
2178+
\item System has list of applications available
2179+
\item Updates and bug fixes are installed for all applications using one interface (GUI or command line) -- very reliable
2180+
\item Packages are digitally signed -- security
2181+
\item User can set custom repositories to get new packages
2182+
\end{itemize}
2183+
\item The most different task among distributions
2184+
\item Packages have dependencies -- required shared libraries and so on -- use package manager and try to avoid downloading packages from the internet
2185+
\item \alert{Read manual for your distribution!}
2186+
\item Package is basically an archive and system has configured directories where to unpack it -- binaries are commonly in \texttt{/usr/bin/}, shared libraries in \texttt{/lib} and \texttt{/lib64} and rest in \texttt{/var}
2187+
\item User should not care where parts of packages go to -- system is taking the care -- user can only damage it
2188+
\item Shared libraries are installed automatically whenever some application needs them
2189+
\item As all files are placed in standard defined directories, it is very simple to use them also for another applications
2190+
\item Applications not available in repositories, neither as distributional package should be installed into \texttt{$\sim$/bin} for current user or \texttt{/usr/local} for all users (binaries then go into \texttt{bin} and so on)
21822191
\end{itemize}
2183-
\item The most different task among distributions
2184-
\item Packages have dependencies -- required shared libraries and so on -- use package manager and try to avoid downloading packages from the internet
2185-
\item \alert{Read manual for your distribution!}
2186-
\end{itemize}
21872192
\end{frame}
21882193
21892194
\begin{frame}{Package management in command line in openSUSE and Debian/Ubuntu}
@@ -2271,6 +2276,12 @@ \section{Software}
22712276
\end{bashcode}
22722277
\end{frame}
22732278
2279+
% \begin{frame}{Launching of Windows and DOS applications in Linux}
2280+
% \begin{itemize}
2281+
% \item
2282+
% \end{itemize}
2283+
% \end{frame}
2284+
22742285
\section{MetaCentrum}
22752286
22762287
\begin{frame}[allowframebreaks]{CESNET and MetaCentrum}
@@ -2415,8 +2426,11 @@ \section{MetaCentrum}
24152426
24162427
\section{Administration}
24172428
2418-
\begin{frame}{Creation and control of FS}
2429+
\subsection{File systems}
2430+
2431+
\begin{frame}[allowframebreaks]{Creation and control of FS}
24192432
\begin{itemize}
2433+
\item \texttt{fdisk -l} lists disks and partitions
24202434
\item To manage disk partitioning use \texttt{fdisk /dev/sdX} (doesn't support GPT very well yet) or \texttt{gdisk /dev/sdX}
24212435
\item When hard drive is partitioned, partitions must be formatted
24222436
\item Commands \texttt{mkfs.*} create various FS, common syntax is \texttt{mkfs.XXX -parameters /dev/sdXY}, where sdXY is particular disk partition
@@ -2425,13 +2439,26 @@ \section{Administration}
24252439
\item \texttt{tune2fs -parameters /dev/sdXY} can set various parameters to influence behavior of disk partition
24262440
\item \texttt{hdparm -parameters /dev/sdX} can set advanced hardware parameters of hard drive
24272441
\item The most convenient is using graphical tools available in all distributions\ldots
2442+
\begin{itemize}
2443+
\item in openSUSE there is YaST administrative module -- from command line launch \texttt{yast --qt disk} for graphical or \texttt{yast disk} for text-based version
2444+
\item All distributions have graphical tools like \href{http://gparted.org/}{GParted} where it is possible to comfortable manage disks
2445+
\end{itemize}
2446+
\item \texttt{df -h} shows available/occupied space on disks/partitions, but because of special features of Btrfs it doesn't show every time correct values for this FS -- it is better to use \texttt{btrfs fi df /mount/point} (\texttt{/mount/point} use to be the most commonly \texttt{/})
24282447
\end{itemize}
24292448
\end{frame}
24302449
2450+
% \begin{frame}{Btrfs and Snapper}
2451+
% \begin{itemize}
2452+
% \item
2453+
% \end{itemize}
2454+
% \end{frame}
2455+
2456+
\subsection{System services}
2457+
24312458
\begin{frame}[fragile]{Managing system services}
24322459
\begin{itemize}
24332460
\item Different among distributions -- several main methods
2434-
\item Most common is SystemD, less common older init scripts and RC scripts
2461+
\item Most common is \href{https://wiki.freedesktop.org/www/Software/systemd/}{SystemD}, less common older init scripts and RC scripts
24352462
\item Used to manage services like web server, database, \ldots
24362463
\item \alert{Read documentation for your distribution!}
24372464
\item All actions require root authentication
@@ -2446,28 +2473,54 @@ \section{Administration}
24462473
\end{bashcode}
24472474
\end{frame}
24482475
2449-
\section{The end}
2476+
\begin{frame}[fragile]{SystemD usage}
2477+
\begin{bashcode}
2478+
# List installed services and their status
2479+
systemctl list-units --type service
2480+
# Enable/disable/see status/start/stop service
2481+
systemctl enable/disable/status/start/stop servicename # TAB helps
2482+
# Show overriden config files
2483+
systemd-delta
2484+
# Analyze boot time (how long does each service take to start)
2485+
systemd-analyze blame # Text output
2486+
systemd-analyze plot > filename.svg # Same in graphics
2487+
# Log for particular service
2488+
journalctl -u servicename
2489+
# Last logged messages (press Ctrl+C to exit)
2490+
journalctl -f
2491+
# Log records since last boot
2492+
journalctl -b
2493+
# Time and date information and management
2494+
timedatectl
2495+
\end{bashcode}
2496+
\end{frame}
24502497
2451-
% \begin{frame}[fragile]{}
2498+
% \section{Git}
2499+
2500+
% \begin{frame}[fragile]{Git and GitHub}
24522501
% \begin{bashcode}
24532502
% #
24542503
% \end{bashcode}
24552504
% \end{frame}
2456-
%
2457-
% \begin{frame}{}
2505+
2506+
\section{The end}
2507+
2508+
% \subsection{Switching to Linux}
2509+
2510+
% \begin{frame}{Brief list of applications to help to switch to Linux}
24582511
% \begin{itemize}
24592512
% \item
24602513
% \end{itemize}
24612514
% \end{frame}
2462-
%
2515+
24632516
% \subsection{Resources}
2464-
%
2517+
24652518
% \begin{frame}{}
24662519
% \begin{itemize}
24672520
% \item
24682521
% \end{itemize}
24692522
% \end{frame}
2470-
%
2523+
24712524
% \subsection{The very end}
24722525
24732526
\begin{frame}{The end}{Our course is over\ldots}
@@ -2491,13 +2544,8 @@ \section{The end}
24912544
\end{document}
24922545
24932546
% % Missing topics
2494-
% Launching of Windows and DOS applications in Linux
2495-
% Where to look for help, another sources of information
2496-
% Brief list of applications to help to switch to Linux
24972547
% How to break system :-)
24982548
% Security, antiviruses
24992549
% More examples about software on MetaCentrum, scripts (on MetaCentrum)
25002550
% More about regular expressions
25012551
% recommend software, how it is with installation
2502-
% GIT, GitHub
2503-
% placing of files, libraries, ...

0 commit comments

Comments
 (0)