Commit acc20c87 authored by Jorge Suárez de Lis's avatar Jorge Suárez de Lis 💭

Added markers

parent 4f3b27e4
......@@ -347,40 +347,40 @@
</section>
<section>
<section>
<h4><span class="marker">[I]</span></h4>
<h1>3. What's in a typical Linux-based system?</h1>
</section>
<section>
<span class="marker">[i]</span>
<img src="img/whatsinlinux.png" alt="What's in Linux? 1">
</section>
<section>
<img src="img/whatsinlinux2.png" alt="What's in Linux? 2">
</section>
<section>
<h2>Standard C Library</h2>
<h2>Standard C Library <span class="marker">[J]</span></h2>
<h3 class="fragment">Most Basic Libraries</h3>
<h3 class="fragment">GNU C</h3>
</section>
<section>
<h2>CLI Shell</h2>
<h2>CLI Shell <span class="marker">[K]</span></h2>
<h3 class="fragment">Most Basic user interface</h3>
<h3 class="fragment">BASH</h3>
</section>
<section>
<h2>Common Unix Tools</h2>
<h2>Common Unix Tools <span class="marker">[L]</span></h2>
<h3 class="fragment">Compilers</h3>
<h3 class="fragment">Text Editors</h3>
<h3 class="fragment">Mostly GNU and BSD tools</h3>
</section>
<section>
<h2>Bootloader</h2>
<h2>Bootloader <span class="marker">[M]</span></h2>
<h3 class="fragment">GRUB</h3>
</section>
<section>
<img src="img/grub.png" alt="GRUB">
</section>
<section>
<h2>Init System</h2>
<h2>Init System <span class="marker">[N]</span></h2>
<h3 class="fragment">SysV Init</h3>
<h3 class="fragment">Upstart</h3>
<h3 class="fragment">Systemd</h3>
......@@ -398,7 +398,7 @@
<img src="img/ubuntusplash.png" alt="Ubuntu Bootsplash">
</section>
<section>
<h2>Windowing System</h2>
<h2>Windowing System <span class="marker">[O]</span></h2>
<h3 class="fragment">X Window System</h3>
<h3 class="fragment">Wayland</h3>
<h3 class="fragment">Mir</h3>
......@@ -408,7 +408,7 @@
<img src="img/xwin.png" alt="XWin">
</section>
<section>
<h2>Graphical Login</h2>
<h2>Graphical Login <span class="marker">[P]</span></h2>
<h3 class="fragment">Lightdm</h3>
</section>
<section>
......@@ -418,7 +418,7 @@
<img src="img/gdm.png" alt="GDM">
</section>
<section>
<h2>Desktop Environment</h2>
<h2>Desktop Environment <span class="marker">[Q]</span></h2>
<h3 class="fragment">Unity</h3>
<h3 class="fragment">KDE</h3>
<h3 class="fragment">GNOME</h3>
......@@ -448,7 +448,7 @@
<img src="img/e17.jpeg" alt="E17">
</section>
<section>
<h2>Audio Daemon</h2>
<h2>Audio Daemon <span class="marker">[R]</span></h2>
<h3 class="fragment">Pulseaudio</h3>
</section>
<section>
......@@ -468,7 +468,7 @@
<h3>Pavucontrol</h3>
</section>
<section>
<h2>Networking daemon</h2>
<h2>Networking daemon <span class="marker">[S]</span></h2>
<h3 class="fragment">Network Manager</h3>
</section>
<section>
......@@ -476,7 +476,7 @@
<h3>Nm-applet in Ubuntu</h3>
</section>
<section>
<h2>Software and Updates Managing</h2>
<h2>Software and Updates Managing <span class="marker">[T]</span></h2>
</section>
<section>
<img src="img/apt.png" alt="APT-get">
......@@ -495,7 +495,7 @@
<h3>GNOME Software</h3>
</section>
<section>
<h2>Distributions Standarization</h2>
<h2>Distributions Standarization <span class="marker">[U]</span></h2>
<h3 class="fragment">Linux Standard Base (LSB)</h3>
<h3 class="fragment">Filesystem Hierarchy Standard (FHS)</h3>
<h3 class="fragment">Freedesktop.org</h3>
......@@ -512,13 +512,13 @@
<h1>4. First Steps</h1>
</section>
<section>
<h2>Live distributions</h2>
<h2>Live distributions <span class="marker">[V]</span></h2>
</section>
<section>
<video controls src="img/manjaro.webm"></video>
</section>
<section>
<h2>Choosing a distribution</h2>
<h2>Choosing a distribution <span class="marker">[W]</span></h2>
</section>
<section>
<h2>Criteria?</h2>
......@@ -532,14 +532,14 @@
<img src="img/choose.png" alt="Choose!">
</section>
<section>
<h2>Virtual Machines</h2>
<h2>Virtual Machines <span class="marker">[X]</span></h2>
</section>
<section>
<img src="img/virtualbox.png" alt="Virtualbox">
<h2>Virtualbox</h2>
</section>
<section>
<h2>Installation</h2>
<h2>Installation <span class="marker">[Y]</span></h2>
</section>
<section>
<h2>WHAT YOU Need to know</h2>
......@@ -568,12 +568,12 @@
<h1>5. Bash Shell</h1>
</section>
<section>
<h2>How to access a shell</h2>
<h2>How to access a shell <span class="marker">[Z]</span></h2>
<h4 class="fragment">Virtual terminals. Start with <kbd>Control</kbd>+<kbd>Alt</kbd>+<kbd>F1</kbd></h4>
<h4 class="fragment">X Terminals: Gnome-terminal, Konsole, Xterm...</h4>
</section>
<section>
<h2>Basics of Command Line</h3>
<h2>Basics of Command Line <span class="marker">[AA]</span></h3>
</section>
<section>
<h3>improves your flexibility and productivity as an engineer</h3>
......@@ -593,7 +593,7 @@
<h2>Shebang</h2>
</section>
<section>
<h2>Some commodities and tricks for the everyday life</h2>
<h2>Some commodities and tricks for the everyday life <span class="marker">[AB]</span></h2>
</section>
<section>
<h2>Let's see some cool Key combinations!</h2>
......@@ -635,7 +635,7 @@
<h3>Comment out current line and save in history</h3>
</section>
<section>
<h2>Tricks to be a Bash Hacker</h2>
<h2>Tricks to be a Bash Hacker <span class="marker">[AC]</span></h2>
<h3 class="fragment">Eval</h3>
<h3 class="fragment">Weird variable expansions</h3>
<h3 class="fragment">Subshells</h3>
......@@ -645,7 +645,7 @@
<h2>More useful 3rd party commands</h2>
</section>
<section>
<h3>Search files with find and locate</h3>
<h3>Search files with find and locate <span class="marker">[AD]</span></h3>
<pre><code class="hljs">$ find ~ -iname *.c -exec rm '{}' ';'
</code></pre>
<pre><code class="hljs">$ find . -mtime +4 # Modified at least 4 days ago
......@@ -655,7 +655,7 @@ $ find . -msize 2M # At least 2MB of size
</code></pre>
</section>
<section>
<h3>xargs and parallel</h3>
<h3>xargs and parallel <span class="marker">[AE]</span></h3>
<pre><code class="hljs">$ grep 'stdlib.h' $(find . -name '*.c')
$ find . -name '*.c' | xargs grep 'stdlib.h'
</code></pre>
......@@ -663,14 +663,14 @@ $ find . -name '*.c' | xargs grep 'stdlib.h'
</code></pre>
</section>
<section>
<h3>More about process management: pstree, pkill</h3>
<h3>More about process management: pstree, pkill <span class="marker">[AF]</span></h3>
<pre><code class="hljs">$ pstree -p
</code></pre>
<pre><code class="hljs">$ pkill -f name
</code></pre>
</section>
<section>
<h3>Resources usage measurement</h3>
<h3>Resources usage measurement <span class="marker">[AG]</span></h3>
<pre><code class="hljs">$ free -m
</code></pre>
<pre><code class="hljs">$ df -l -h -t ext4
......@@ -685,7 +685,7 @@ $ find . -name '*.c' | xargs grep 'stdlib.h'
</code></pre>
</section>
<section>
<h3>Performance measurement</h3>
<h3>Performance measurement <span class="marker">[AH]</span></h3>
<pre><code class="hljs">$ ioping -q -c 10 /
</code></pre>
<pre><code class="hljs">$ iperf -s # in one end
......@@ -693,7 +693,7 @@ $ iperf -c servername # in the other end
</code></pre>
</section>
<section>
<h3>Text processing with sed and awk</h3>
<h3>Text processing with sed and awk <span class="marker">[AI]</span></h3>
<pre><code class="hljs">$ awk '{print $3 "\t" $4}' &lt;&lt;EOF
> 1) Amit Physics 80
> 2) Rahul Maths 90
......@@ -719,7 +719,7 @@ EOF
</code></pre>
</section>
<section>
<h3>Network and web debugging with curl</h3>
<h3>Network and web debugging with curl <span class="marker">[AJ]</span></h3>
<pre><code class="hljs">$ curl -k -I https://citius.usc.es
HTTP/1.1 200 OK
Server: nginx
......@@ -742,7 +742,7 @@ X-Clacks-Overhead: GNU Terry Pratchett
</code></pre>
</section>
<section>
<h3>TCP Port Debugging</h3>
<h3>TCP Port Debugging <span class="marker">[AK]</span></h3>
<pre><code class="hljs">$ nc -l 9999
$ echo "Hello" | nc localhost 9999
</code></pre>
......@@ -760,7 +760,7 @@ tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
...
</code></pre> </section>
<section>
<h3>Network diagnostics</h3>
<h3>Network diagnostics <span class="marker">[AL]</span></h3>
<pre><code class="hljs">$ traceroute
</code></pre>
......@@ -768,7 +768,7 @@ tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
</code></pre>
</section>
<section>
<h3>Learn to look in the logs</h3>
<h3>Learn to look in the logs <span class="marker">[AM]</span></h3>
<pre><code class="hljs">$ tail -n 200 -f /var/log/syslog
</code></pre>
......@@ -777,7 +777,7 @@ tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
<h4>Inside less, tail with <kbd>Shift</kbd>+<kbd>F</kbd></h4>
</section>
<section>
<h3>Something wrong in your system?</h3>
<h3>Something wrong in your system? <span class="marker">[AN]</span></h3>
<pre><code class="hljs">$ dmesg
</code></pre>
<img src="img/dmesg.jpg" alt="Dmesg error">
......@@ -788,7 +788,7 @@ tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
<h3 class="fragment highlight-blue">Read the manpages</h3>
<h3 class="fragment highlight-blue">Learn how bash works</h3>
<h3 class="fragment highlight-blue">Learn to use vi, emacs or nano</h3>
<h3 class="fragment highlight-blue">Try to make tasks simple</h3>
<h3 class="fragment highlight-blue">Search Stackoverflow (no joking)</h3>
</section>
<section>
......@@ -796,22 +796,22 @@ tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
<h1>6. Remote Access</h1>
</section>
<section>
<h2>Remote access with SSH</h2>
<h2>Remote access with SSH <span class="marker">[AO]</span></h2>
</section>
<section>
<h2>SSH tunneling</h2>
<h2>SSH tunneling <span class="marker">[AP]</span></h2>
</section>
<section>
<h2>Avoid programs getting killed when closing a console (disown, nohup)</h2>
<h2>Avoid programs getting killed when closing a console (disown, nohup) <span class="marker">[AQ]</span></h2>
</section>
<section>
<h2>Session management with screen</h2>
<h2>Session management with screen <span class="marker">[AR]</span></h2>
</section>
<section>
<h2>Remote X server management with xpra</h2>
<h2>Remote X server management with xpra <span class="marker">[AS]</span></h2>
</section>
<section>
<h2>Session + X server management combining screen and xpra</h2>
<h2>Session + X server management combining screen and xpra <span class="marker">[AT]</span></h2>
</section>
</section>
......
......@@ -161,7 +161,7 @@ This makes working with input and output resources very easy:
- Write a value to a file that represents a configuration mode of your wifi adaptor, to change it.
- Write random data to a file that represents the hard drive to wipe all the data securely.
## What's in a typical Linux-based System? \[I\]
## What's in a typical Linux-based System? \[i\]
A Linux-based system can be divided in 2 separated modes or *realms*: Kernel mode, and User mode.
......@@ -173,11 +173,11 @@ Linux runs separately from the rest of the system, in **Kernel Mode**. It uses i
The other components run on top of that, on **User Mode**, interfacing with the kernel and the user. This covers a widely range of lower and higher level software.
### C library
### C library \[J\]
Usually, the **GNU Libc** implementation, which serves as the most basic libraries to interface with the kernel (system calls) and basic operations to be able to build higher level libraries.
### CLI Shell
### CLI Shell \[K\]
The most basic, text-based, user interface. Command-line interfaces (CLI) are easy to compose and automate, but are unintuitive and visually poor.
......@@ -185,7 +185,7 @@ This shell is usually a Bourne Shell compatible implementation, such as **Bash**
Some alternatives includes **dash**, which is focused on being POSIX compliant; **csh**, providing a C-like syntax; **zfs**, the default for Arch Linux; and BusyBox's **ash**, a complete but light shell included in most embedded devices.
### Common Unix tools
### Common Unix tools \[L\]
On every Linux system there is a mix of basic tools from Linux itself, GNU, BSD and other sources. These tools include -but are not limited to- compilers, text editors, and more.
......@@ -193,13 +193,13 @@ The C compiler **GNU gcc** and the build system **GNU make** were important mile
Text editors **vim**, **emacs** or **nano** are usually included in most Linux distributions.
### Bootloader
### Bootloader \[M\]
To be able to boot, the system first needs to load the kernel and the most basic libraries. This is done usually by the bootloader GNU GRUB, that implements access to most common filesystems and can load Linux kernels, as well as chainload other operative system bootloaders as the one in Microsoft Windows.
Until mid 2000s, the most common bootloader was LILO, that has been completely preceeded by GNU GRUB.
### Init System
### Init System \[N\]
Traditionally, *init* is the first process started after the kernel is loaded and is responsible for configuring the entire system at boot time.
......@@ -227,7 +227,7 @@ Included in Systemd are improved replacements to some core utilities such as *pm
Systemd scripts are called *services* and usually reside or are linked from `/etc/systemd/system`.
### Windowing System
### Windowing System \[O\]
A Windowing System provides a basic implementation of the WIMP paradigm for user interfaces: windows, icons, menus and pointer. It's the most **basic set of tools and libraries** under which graphical toolkits such as GTK+ are built.
......@@ -241,13 +241,13 @@ Since the *X Window System* is considered bloated and obsolete and is being repl
Android uses its own windowing system, **SurfaceFlinger**.
### Graphical Login
### Graphical Login \[P\]
The *login* is the software responsible for checking authentication, authorization and setup the user session. The most common graphical login program is **LightDM**, which provides graphical implementations in several toolkits.
Until the early 2010s, **GDM** and **KDM** were the default for GNOME and KDE-based systems. Some other graphical logins are still used nowadays.
### Desktop Environment
### Desktop Environment \[Q\]
The desktop environment is an implementation of the desktop metaphor, usually built upon a windowing system.
......@@ -261,7 +261,7 @@ Most distributions provide a default desktop environment, while allow users to i
*Desktop Environments* are built using a set of tools, such as windows compositors, desktop backgrounds, toolbars and other small applications.
### Audio Daemon
### Audio Daemon \[R\]
**PulseAudio** is present now in most desktop Linux distributions as a middleware between the audio libraries and *Alsa*, the kernel interface.
......@@ -271,13 +271,13 @@ There are several graphical front-ends to *PulseAudio*, but most of them are *in
Android uses its own audio daemon instead, **AudioFlinger**.
### Networking Daemon
### Networking Daemon \[S\]
**NetworkManager** is present now in most desktop Linux distributions as a high-level interface to network interface configuration and setup.
Main component is a *daemon* which manages connections and reports network changes, and several graphical front-ends, such as **nm-applet** (the default for *Ubuntu*) and **nmcli**, for the command line.
### Software and Updates Managing
### Software and Updates Managing \[T\]
Distributions usually provide a large set of software and data such as themes and fonts contained in packages.
......@@ -310,7 +310,7 @@ However, higher level abstractions are also supported. **PackageKit** is a suite
Some software management front-ends, such as **GNOME Software** (the default graphical frontend for *Ubuntu 16.04*) are using *PackageKit* to provide a consistent experience between distributions.
### Distributions Standarization
### Distributions Standarization \[U\]
#### Linux Standard Base
......@@ -388,7 +388,7 @@ The **Desktop Application Autostart Specification** defines a method for automat
## First Steps
### Live Distributions
### Live Distributions \[V\]
A Live Distribution is a complete bootable distribution that runs from a usually read-only device, such as a DVD. It allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration.
......@@ -398,7 +398,7 @@ In modern live distributions, the read-only file system is merged with a RAM dri
Most known live distributions include **Trisquel**, **Fedora**, **Mandriva**, **Gentoo Linux** and the aforementioned **Ubuntu**.
### Choosing a distribution
### Choosing a distribution \[W\]
Some distributions are targeted for newbies, while others are specifically targeted to inhuman robots, so you might want to pick a distribution before going on.
......@@ -412,7 +412,7 @@ Some distributions are targeted for newbies, while others are specifically targe
- **Arch Linux** focuses on simplicity, but that is not always translated to ease of use, so it's targeted to intermediate users. "Layers of abstraction that serve to hide internals are never a good thing. Instead, the internals should be designed in a way such that they NEED no hiding." Like *OpenSUSE Tumbleweed* is a rolling release distribution and has no desktop environment by default.
### Virtual Machines
### Virtual Machines \[X\]
A virtual machine is a software implementation of a machine that executes programs like a physical machine. While traditionally virtual machines were much less efficient than actual machines, modern processors and chipsets allow now using technologies for a faster virtualization, comparable to their phisical counterparts.
......@@ -422,7 +422,7 @@ A *Guest Additions* package of device drivers and system applications is availab
A virtual machine is a good way to test Linux distributions, without having to worry of damaging the current operative system.
### Installation
### Installation \[Y\]
Install a Linux distribution is an easy and straightforward task in some distributions like *Ubuntu* or *Linux Mint*, but requires some basic system knowledge in most of them, or even follow a step by step manual in others.
......@@ -505,7 +505,7 @@ Released in 1989, Bash has been the default command line interface in most Linux
Bash is a command processor that typically runs in a text window, where the user types commands that cause actions. Like all Unix shells, it supports filename globbing, piping, here documents, command substitution, variables and control structures for condition-testing and iteration.
### How to access a shell
### How to access a shell \[Z\]
Most linux distributions lacking a default desktop environment, like server versions of *Ubuntu*, or *Arch Linux*, default to a Bash interface in a virtual terminal. It's also the the default *recovery mode* and the place you will end if there are problems with the graphical environment.
......@@ -520,7 +520,7 @@ You can also run a shell within the graphical session using terminals for *X*.
- **xterm** is included with *Xorg*, so it's usually found on any system
- **terminator** is an advanced tiling terminal with support for broadcasting the keyboard input
### Basics of Command Line
### Basics of Command Line \[AA\]
Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways.
......@@ -555,7 +555,7 @@ $ /usr/bin/python2.7 script.py
$ ./script.py
```
### Commodities and tricks for the everyday life
### Commodities and tricks for the everyday life \[AB\]
In Bash, use <kb>Tab</kbd> to complete arguments or list all available commands and <kbd>Control</kbd>+<kbd>r</kbd> to search through command history
......@@ -576,7 +576,7 @@ If you are halfway through typing a command but change your mind, hit <kbd>Alt</
To go back to the previous working directory use `cd -`.
### Be a Bash Hacker
### Be a Bash Hacker \[AC\]
To use the output of a command as a part of other command, you can enclose some parts in `\`\``, or '$()'.
......@@ -615,7 +615,7 @@ EOF
These commands are not part of Bash, and some of them are not installed by default in most Linux distributions, but can be installed via packages.
#### Search files with find and locate
#### Search files with find and locate \[AD\]
The command `find` is a good option to find files, but also to execute a command on those files.
......@@ -636,7 +636,7 @@ If you just want to find files, and if the system has `updatedb` installed, you
$ locate sem_init.c
```
#### xargs and parallel
#### xargs and parallel \[AE\]
Alternatively to `$()` and `\`\``, `xargs` can be used to compose commands in a more readable and, sometimes, more convenient way.
......@@ -651,13 +651,13 @@ $ find . -name '*.c' | xargs grep 'stdlib.h'
$ find . -name \*.tar | parallel tar xvf
```
#### More about process management: pstree, pkill
#### More about process management: pstree, pkill \[AF\]
The command `pstree` prints a tree of processes. The most convenient form is `pstree -p` which prints the full tree with PIDs.
The command `pkill` is a more convenient way to send signals to processes. You can specify `pkill name` to look by name, or `pkill -f name` to look by full command line. `pgrep` is the analog tu just look for PIDs.
#### Resources usage measurement
#### Resources usage measurement \[AG\]
To measure the **memory usage**, there is a simple tool called `free`, more convenient as `free -h`. Linux tries to use all the available memory for disk buffers and cache, so the actual free value is the one on the second row.
......@@ -699,7 +699,7 @@ $ ifstat
You can also use the combined disk, network, CPU, disk and memory usage tool `dstat`.
#### Performance measurement
#### Performance measurement \[AH\]
To measure **disk performance** in terms of latency and input/output operations per second, you can use `ioping`.
......@@ -709,7 +709,7 @@ To measure **disk performance** in terms of latency and input/output operations
To measure **network performance** in terms of throughput, you can use `iperf`. *Iperf* allows the user to set various parameters that can be used for testing a network, or alternatively for optimizing or tuning a network.
#### Text processing with sed and awk
#### Text processing with sed and awk \[AI\]
To process text in bash, you can use `awk` or `sed`. Advanced knowledge of regular expressions is required, though.
......@@ -744,7 +744,7 @@ $ sed -i 's/lib\/modules_x32/lib\/modules_x64/g' $(find /opt -type f)
For simple use cases, tools such as `cut`, `join`, `tail`, `head`, `sort`, `uniq` are more useful, though.
#### Network and web debugging with curl
#### Network and web debugging with curl \[AJ\]
To test for Internet reachability, but also http redirections, server reaction to diverse headers, cookies... in websites, `curl` is very useful.
......@@ -773,7 +773,7 @@ X-Clacks-Overhead: GNU Terry Pratchett
Strict-Transport-Security: max-age=31536000
```
#### TCP port debugging
#### TCP port debugging \[AK\]
You can open arbitrary TCP ports to listen for connections and communicate over the network using **netcat**.
......@@ -803,11 +803,11 @@ tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
...
```
#### Network diagnostics
#### Network diagnostics \[AL\]
To test network routes, you can use **traceroute** or **mtr** where available. *Mtr* is interactive and has more features.
#### Learn to look in the logs
#### Learn to look in the logs \[AM\]
System logs are stored on `/var/log` and are usually on plain text. However, to save space, logs are rotated and usually commpressed by **logrotate**.
......@@ -817,7 +817,7 @@ Use `less` (or `more` in more restricted environments) to navigate through the f
To handle compressed files, you can use `zless` and `zcat`. These files won't grow, so a gzip-aware version of `tail` is not needed.
#### Something wrong in your system?
#### Something wrong in your system? \[AN\]
If something is wrong in your system (the Wifi stopped working, or the USB pendrive you just plugged doesn't work) you can look for issues in `dmesg`.
......@@ -825,7 +825,7 @@ You can usually find more information in `/var/log/syslog`, `/var/log/kern.log`
## Remote Access
### Remote access with SSH
### Remote access with SSH \[AO\]
**SSH** is usually enabled in most distributions by default, to access a shell remotely.
......@@ -835,7 +835,7 @@ You can enable **X Forwarding** to be able to open graphical programs remotely.
$ ssh -XC jorge.suarez@172.16.243.95
```
### SSH tunneling
### SSH tunneling \[AP\]
Tuneling allows to access a network service that the nuderlying network don'r provide, through another computer resources.
......@@ -847,7 +847,7 @@ $ ssh -L 8080:youtube.com:80 jorge@myhome
All the requests to port `8080` of the host `myhome` will be tunneled to `youtube.com` in port `80`. That does not mean the Youtube website will work out of the box, though.
### Avoid programs getting killed when closing a console (disown, nohup)
### Avoid programs getting killed when closing a console (disown, nohup) \[AQ\]
When a program is run from within a shell, the program becomes a **child** of that shell. You can check that using `pstree -p`. When the shell is closed, it sends the signap `NOHUP` to all childs, and most programs terminate when that signal is received. This results in programs being killed when you connect, then disconnect a SSH session.
......@@ -866,7 +866,7 @@ $ nohup ./myscript &
nohup: ignoring input and appending output to ‘nohup.out’
```
### Session management with screen
### Session management with screen \[AR\]
**Screen** is a session manager for terminal. Screen lets you open a shell session, dettach from it a reattach to it later. We can take advantage of that easily working with SSH.
......@@ -876,7 +876,7 @@ To dettach from a Screen session without losing it, press <kbd>Control</kbd>+<kb
When using screen, once dettached, you can disconnect from the server at any time. Screen is automatically dettached from the running shell, so it's not killed.
### Remote X server management with xpra
### Remote X server management with xpra \[AS\]
**Xpra** is the screen analog to X windows. You can attach to a window, dettach from it and reattach it later.
......@@ -902,7 +902,7 @@ To dettach without killing Firefox, instead of closing the Firefox window, press
To be able to see windows remotely, you still need to enable the *X Forwarding*, that is, connect using `ssh -X`.
### Session + X server management combining screen and xpra
### Session + X server management combining screen and xpra \[AT\]
If `screen` is run with a `DISPLAY` owned by xpra, you can benefit from session management with the possibility to attach to windows.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment