<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://wiki.tuxtrooper.fr/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://wiki.tuxtrooper.fr/feed.php">
        <title>Tuxtrooper Wiki - cheatsheet</title>
        <description></description>
        <link>http://wiki.tuxtrooper.fr/</link>
        <image rdf:resource="http://wiki.tuxtrooper.fr/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-04-10T01:00:03+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ansible&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:applescript&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:arch&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:audit&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:aws&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:bash&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:bpf&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:chrome&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:compilation&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:compression&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:dns&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:docker&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:docker_swarm&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:filesystem&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:firefox&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:firewalld&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:fonts&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:foreman&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:forensic&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:git&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:google&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:gpg&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:i3&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:irc&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:kernel&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:linux&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:luks&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:mac&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:magic&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:man&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:multipass&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:network&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:nextcloud&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:nmap&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:permissions&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:process&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:proxmox&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:proxy&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:python&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:qnap&amp;rev=1729951446&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:raspberrypi&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:regex&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:scep&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:screen&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:seccomp&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:selinux&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:snmp&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ssh&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ssl&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemd&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemdnspawn&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemdtimer&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:tcpdump&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:tcp_ip&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ulimit&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:vim&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:virtualbox&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:vmware&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:wifi&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:windows&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:xrandr&amp;rev=1728939596&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://wiki.tuxtrooper.fr/lib/tpl/bootstrap3/images/favicon.ico">
        <title>Tuxtrooper Wiki</title>
        <link>http://wiki.tuxtrooper.fr/</link>
        <url>http://wiki.tuxtrooper.fr/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ansible&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ansible</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ansible&amp;rev=1728939596&amp;do=diff</link>
        <description>Ansible</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:applescript&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>applescript</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:applescript&amp;rev=1728939596&amp;do=diff</link>
        <description>AppleScript

Cheatsheet

	*  Get actual path of finder window if opened


#!/usr/bin/env bash

if ! osascript -s o &lt;&lt;EndOfScript
    tell application &quot;Finder&quot;
        try
            set c to (count of Finder windows)
        on error message number -1743
            error &quot;Privacy settings prevent access to Finder&quot;
        end try

        if c is 0 then
            return POSIX path of (desktop as alias)
        else
            return POSIX path of ((target of Finder window 1) as alias)
     …</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:arch&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>arch</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:arch&amp;rev=1728939596&amp;do=diff</link>
        <description>Archlinux

Mirror

	*  Use best available mirror


sudo reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist


Updates

	*  Restart systemd with PID # 1 without rebooting Linux box


systemctl daemon-reexec</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:audit&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>audit</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:audit&amp;rev=1728939596&amp;do=diff</link>
        <description>Auditd

Read date from one auditd log:


date -d @1548947016.418</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:aws&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>aws</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:aws&amp;rev=1728939596&amp;do=diff</link>
        <description>AWS</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:bash&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:bash&amp;rev=1728939596&amp;do=diff</link>
        <description>Bash

Startup

[Startup]

Des raccourcis utiles

	*  Ctrl + a : Pour aller au début de la ligne 
	*  Ctrl + e : Pour aller à la fin de la ligne 
	*  Ctrl + b : Pour se déplacer d&#039;un caractère vers l&#039;arrière (flèche gauche) 
	*  Ctrl + f : Pour se déplacer d&#039;un caractère vers l&#039;avant (flèche droite)</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:bpf&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bpf</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:bpf&amp;rev=1728939596&amp;do=diff</link>
        <description>BPF



BPFtrace

Get all ran bash command


bpftrace -e &#039;uretprobe:/bin/bash:readline { time(&quot;%H:%M:%S  &quot;);
    printf(&quot;%-6d %s %5d (%s) -&quot;, pid, str(retval), uid, username);
    cat(&quot;/proc/%d/environ&quot;, pid) ; printf(&quot;\n&quot;)}&#039;</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:chrome&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chrome</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:chrome&amp;rev=1728939596&amp;do=diff</link>
        <description>Google Chrome

HSTS

If you&#039;re blocked by HSTS on localhost dev servers got to chrome:net-internals/#hsts and remove localhost</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:compilation&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>compilation</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:compilation&amp;rev=1728939596&amp;do=diff</link>
        <description>Compilation

Steps

Preprocessing --&gt; Compilation --&gt; Assembly --&gt; Linking --&gt; Loading</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:compression&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>compression</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:compression&amp;rev=1728939596&amp;do=diff</link>
        <description>Compression

Pigz


tar --use-compress-program=pigz -cf - data | (pv -p --timer --rate --bytes &gt; archive.tar.gz)</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:dns&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dns</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:dns&amp;rev=1728939596&amp;do=diff</link>
        <description>DNS

DKIM

	*  check DKIM key


dig google._domainkey.DOMAIN TXT</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:docker&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>docker</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:docker&amp;rev=1728939596&amp;do=diff</link>
        <description>Docker

Cheatsheet

	*  Run container at boot


docker run --restart=always &lt;image&gt;


	*  List image from rgistry:


docker image ls | grep &lt;registry&gt; | awk &#039;{print $1 &quot;:&quot; $2}&#039;


	*  docker


docker build -t friendlyname .              # Create image using this directory&#039;s Dockerfile
docker run -p 4000:80 friendlyname          # Run &quot;friendlyname&quot; mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname       # Same thing, but in detached mode
docker exec -it [container-id] bash         # E…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:docker_swarm&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>docker_swarm</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:docker_swarm&amp;rev=1728939596&amp;do=diff</link>
        <description>Docker Swarm

	*  Deploy stack from compose file


docker stack deploy --compose-file docker-compose.yml stackdemo


	*  Delete stack


docker stack rm stackdemo


	*  Add a secret


echo &quot;This is an external secret&quot; | docker secret create my_external_secret -
# or
docker secret create my_external_secret secret_file_path</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:filesystem&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>filesystem</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:filesystem&amp;rev=1728939596&amp;do=diff</link>
        <description>Filesystem</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:firefox&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>firefox</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:firefox&amp;rev=1728939596&amp;do=diff</link>
        <description>Données envoyées à Firefox

Pour savoir si votre navigateur envoie des données à son « maître », vous disposez de plusieurs consoles :
  about:checkerboard
  about:crashes
  about:studies
  about:telemetry
Utilisation du cache

La console about:cache vous permettra de voir la consommation de votre cache.</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:firewalld&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>firewalld</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:firewalld&amp;rev=1728939596&amp;do=diff</link>
        <description>Firewalld

Listes des zones

	*  Drop zone: Tous les paquets entrants sont drop. Seul le trafic sortant est autorisé
	*  Block zone: Tous les paquets entrants sont rejetés avec un  « icmp-host-prohibited ». Seules les connections établies sont autorisées.</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:fonts&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>fonts</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:fonts&amp;rev=1728939596&amp;do=diff</link>
        <description>Fonts

	*  find font name (the anme is the entry before :style= section)


fc-list | grep -i &lt;font name&gt;</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:foreman&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>foreman</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:foreman&amp;rev=1728939596&amp;do=diff</link>
        <description>Foreman

API

	*  Get hostgroups


curl -u &quot;admin&quot; https://&lt;foreman&gt;/api/hostgroups


	*  Get hostgroups which match &lt;search&gt;


curl -u &quot;admin&quot; https://&lt;foreman&gt;/api/hostgroups?search=&lt;search&gt;


	*  Create hostgroups pdt1 to pdt 10 inheriting from base/pdt</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:forensic&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>forensic</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:forensic&amp;rev=1728939596&amp;do=diff</link>
        <description>Forensic

[Forensic]

Disk dump into virtual machine


VboxManage convertfromraw img.raw output.vdi --format VDI


Windows

Windows Forensic</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:git&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>git</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:git&amp;rev=1728939596&amp;do=diff</link>
        <description>Git

Patch

Create a patch from a branch


git diff master Branch1 &gt; ../patchfile


Create a patch from commit


git format-patch -1 &lt;sha&gt;


Pull from original repo (fork)

Do once


$ git remote add upstream &lt;git url&gt;


Do each time you want to update</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:google&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>google</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:google&amp;rev=1728939596&amp;do=diff</link>
        <description>Google products</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:gpg&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gpg</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:gpg&amp;rev=1728939596&amp;do=diff</link>
        <description>GPG

	*  Key pair creation


$ gpg --full-gen-key


	*  List keys


$ gpg --list-keys


	*  List own keys


$ gpg --list-secret-keys
$ gpg -K


	*  Import/export key into binary :


# Import
$ gpg --import &lt;file&gt;
# Export
$ gpg --export &lt;id&gt; --output &lt;file&gt;</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:i3&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>i3</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:i3&amp;rev=1728939596&amp;do=diff</link>
        <description>I3

	*  To know what is the class name of an application launch the command and click on the target window


xprop | grep WM_CLA</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:irc&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>irc</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:irc&amp;rev=1728939596&amp;do=diff</link>
        <description>IRC CheatSheet

Main
 Action  command  Comment  Joining a server  server irc.freenode.net   Joining a channel  join #channel   Setting yourself away  away &lt;reason&gt;   Removing your away status  back   Leaving a channel  part &lt;Message&gt;   Quitting IRC  quit &lt;Message&gt;</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:kernel&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>kernel</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:kernel&amp;rev=1728939596&amp;do=diff</link>
        <description>Kernel

Traitements sur initrd

On peut maintenant faire en sorte, en une seule opération, de décompresser l’initrd du répertoire /boot, dans le répertoire de travail précédemment préparé tout en développant l’archive cpio :

gunzip –c /boot/initrds-$(uname –r).img | cpio –i</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:linux&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:linux&amp;rev=1728939596&amp;do=diff</link>
        <description>Linux</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:luks&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>luks</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:luks&amp;rev=1728939596&amp;do=diff</link>
        <description>LUKS

USB device cipher


$ sudo fdisk /dev/sdf

Commande (m pour l&#039;aide): o
Création d&#039;une nouvelle étiquette DOS avec id de disque 0xc01b95b4.
Les modifications restent en mémoire jusqu&#039;à ce que vous les écriviez.
Après quoi, bien sûr, le contenu précédent sera irrécupérable.
 
Commande (m pour l&#039;aide): w
La table de partitions a été altérée.
 
Commande (m pour l&#039;aide): n
Partition type:
  p primary (0 primary, 0 extended, 4 free)
  e extended
Select (default p):
Utiliser la réponse par défaut…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:mac&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mac</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:mac&amp;rev=1728939596&amp;do=diff</link>
        <description>MacOS

Useful commands

	*  List open listening ports


netstat -pant | grep LISTEN
# to also have the program name
sudo lsof -i -P | grep -i &quot;listen&quot;


Remove quarantine attr


xattr -d com.apple.quarantine /path/to/file


WIFI

Get last connected wifi:</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:magic&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>magic</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:magic&amp;rev=1728939596&amp;do=diff</link>
        <description>Magic keys

Configuration

Pour savoir si la fonctionnalité est disponible sur le système (c&#039;est le cas sur la plupart des distributions Linux actuelles), vérifier si le fichier /proc/sys/kernel/sysrq contient 1.


cat /proc/sys/kernel/sysrq


Si la valeur n&#039;est pas 1, c&#039;est sûrement une valeur de cette liste :</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:man&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>man</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:man&amp;rev=1728939596&amp;do=diff</link>
        <description>Man


NAME
    The name of the command or function, followed by a one-line description of what it does.
SYNOPSIS
    In the case of a command, you get a formal description of how to run it and what command line options it takes.
DESCRIPTION
    A textual description of the functioning of the command or function.
EXAMPLES
    Some examples of common usage.
SEE ALSO
    A list of related commands or functions.
BUGS
    List known bugs.
AUTHOR
   Specify your contact information.
COPYRIGHT
    Spec…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:multipass&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>multipass</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:multipass&amp;rev=1728939596&amp;do=diff</link>
        <description>Multipass

Launch an instance (by default you get the current Ubuntu LTS)


multipass launch --name foo


Run commands in that instance, try running bash (logout or ctrl-d to quit)


multipass exec foo -- lsb_release -a


Pass a cloud-init metadata file to an instance on launch. See using cloud-init with multipass for more details</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:network&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>network</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:network&amp;rev=1728939596&amp;do=diff</link>
        <description>Network

Bond


nmcli device status
nmcli connection add type bond ifname bond0 con-name bond-home
nmcli connection add type ethernet ifname ens1 master bond0 con-name bond-ethernet
nmcli connection add type wifi ifname wlp0s20f3 master bond0 ssid &#039;ASUS_54&#039; con-name bond-wifi
nmcli connection modify bond-wifi wifi-sec.key-mgmt wpa-psk
nmcli connection edit bond-wifi
nmcli connection modify bond0 +bond.options &quot;mode=active-backup,primary=wlp0s20f3&quot;
nmcli connection up bond-home
nmcli connection u…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:nextcloud&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nextcloud</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:nextcloud&amp;rev=1728939596&amp;do=diff</link>
        <description>Netxcloud

Run occ command in docker


docker-compose exec -u www-data web_cloud php occ</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:nmap&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nmap</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:nmap&amp;rev=1728939596&amp;do=diff</link>
        <description>Nmap</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:permissions&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>permissions</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:permissions&amp;rev=1728939596&amp;do=diff</link>
        <description>Permissions

ACL Posix

	*  See acl of a file/folder

getfacl file/folder

	*  Provide RWX to user on file

setfacl -R -m u:user:rwx file/folder

	*  Set default ACL for other on folder

setfacl -m d:o:r folder</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:process&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>process</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:process&amp;rev=1728939596&amp;do=diff</link>
        <description>Process

	*  Disown process without killing them


disown -h &lt;job_id&gt;</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:proxmox&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>proxmox</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:proxmox&amp;rev=1728939596&amp;do=diff</link>
        <description>Proxmox

Create our own LXC container template

	*  Download the base image


pveam update
pveam download &lt;STOCKAGE&gt; centos-7-default_20170504_amd64.tar.xz
mkdir ~/Workdir &amp;&amp; cd ~/Workdir
tar -xJvf /mnt/pve/&lt;STOCKAGE&gt;/template/cache/centos-7-default_20170504_amd64.tar.xz
chroot .</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:proxy&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>proxy</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:proxy&amp;rev=1728939596&amp;do=diff</link>
        <description>Proxy

Cipher proxy passphrase

Use openssl to encrypt your plain text proxy password into a file, with e.g. AES256 encryption:


openssl enc -aes-256-cbc -in pw.txt -out pw.bin


	*  Use a (different) password for protecting the encoded file
	*  Remove plain text pw.txt</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:python&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>python</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:python&amp;rev=1728939596&amp;do=diff</link>
        <description>Python

Links

	*  &lt;https://gto76.github.io/python-cheatsheet/&gt;

Pyenv

	*  Create a virtual env


pyenv virtualenv &lt;python_version&gt; &lt;environment_name&gt;


	*  Activate the versions


pyenv local &lt;environment_name&gt;


	*  Install a version with headers


#On MacOS
PYTHON_CONFIGURE_OPTS=&quot;--enable-framework&quot; pyenv install VERSION
#On Linux
PYTHON_CONFIGURE_OPTS=&quot;--enable-shared&quot; pyenv install 3.6.15</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:qnap&amp;rev=1729951446&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-26T14:04:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>qnap</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:qnap&amp;rev=1729951446&amp;do=diff</link>
        <description>Cron

You must be able to connect to you QNAP NAS using SSH and know how to edit a file using a text editor such as vi before starting it.
The crontab can be used to execute tasks based on a recurring schedule. 
To view the contents of your crontab, please logon to your NAS via SSH and type crontab -l.</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:raspberrypi&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>raspberrypi</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:raspberrypi&amp;rev=1728939596&amp;do=diff</link>
        <description></description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:regex&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>regex</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:regex&amp;rev=1728939596&amp;do=diff</link>
        <description>Regex

URL


(?:(?:https?|ftp):\/\/|\b(?:[a-z\d]+\.))(?:(?:[^\s()&lt;&gt;]+|\((?:[^\s()&lt;&gt;]+|(?:\([^\s()&lt;&gt;]+\)))?\))+(?:\((?:[^\s()&lt;&gt;]+|(?:\(?:[^\s()&lt;&gt;]+\)))?\)|[^\s`!()\[\]{};:&#039;&quot;.,&lt;&gt;?«»“”‘’]))?</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:scep&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scep</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:scep&amp;rev=1728939596&amp;do=diff</link>
        <description>How to get certificate using SCEP protocol

Install dependencies


sudo apt install libnss3-tools certmonger


Add a SCEP CA


sudo getcert add-scep-ca -c CA_IDENTIFIER -u SCEP_URL -R CA_PEM_FORMAT


List CA 


sudo getcert list-cas


if the CA setup worked, you should have something like</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:screen&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>screen</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:screen&amp;rev=1728939596&amp;do=diff</link>
        <description>Créer un screen

Pour créer un nouveau terminal saisir:


screen -S &lt;nom&gt;


Détacher un screen

Une fois dans notre session, si on souhaite laisser tourner un programme dedans, en tâche de fond et avoir la main sur la console, on détache le terminal via la commande de touches : Ctrl+A puis D</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:seccomp&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>seccomp</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:seccomp&amp;rev=1728939596&amp;do=diff</link>
        <description>Seccomp

Sandboxing with libseccomp


# gcc -o myos myos_libseccomp.c -lseccomp
#define _GNU_SOURCE
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/utsname.h&gt;
#include &lt;seccomp.h&gt;
#include &lt;err.h&gt;

static void sandbox(void)
{
    /* allow all syscalls by default */
    scmp_filter_ctx seccomp_ctx = seccomp_init(SCMP_ACT_ALLOW);
    if (!seccomp_ctx)
        err(1, &quot;seccomp_init failed&quot;);

    /* kill the process, if it tries to use &quot;uname&quot; syscall */
    if (seccomp_rule_add_exact(seccomp_c…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:selinux&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>selinux</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:selinux&amp;rev=1728939596&amp;do=diff</link>
        <description>Selinux

audit2allow

If we switch SELinux into Permissive mode and run our mail server for a set period of time, we can log SELinux issues whilst still permitting access (as mentioned in Gathering Audit Logs in Permissive Mode). Checking our logs, we see the following SELinux AVC messages:</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:snmp&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>snmp</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:snmp&amp;rev=1728939596&amp;do=diff</link>
        <description>SNMP

SNMP Walk

v3


snmpwalk -v3 -l authPriv -u &lt;user&gt; -a SHA -A &lt;password&gt; -x AES -X &lt;password&gt; IP &lt;MIB&gt;


SNMP GET

v3


snmpget -v3 -l authPriv -u &lt;user&gt; -a SHA -A &lt;password&gt; -x AES -X &lt;password&gt; IP &lt;MIB&gt;</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ssh&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssh</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ssh&amp;rev=1728939596&amp;do=diff</link>
        <description>SSH

SSHFS

	*  command


sshfs phil@192.168.1.100:/home/phil /usr/share/phil


	*  fstab


phil@192.168.1.100:/home/phil /usr/share/phil fuse.sshfs defaults 0 0


Tunneling

Syntax

ssh -L localport:host:hostport user@ssh_server -N 
where: 
-L - port forwarding parameters (see below) 
localport - local port (chose a port that is not in use by other service) 
host - server that has the port (hostport) that you want to forward 
hostport - remote port 
-N - do not execute a remote command, (you wi…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ssl&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssl</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ssl&amp;rev=1728939596&amp;do=diff</link>
        <description>SSL

Display cert from pkcs12


openssl pkcs12 -in &lt;p12&gt; -nodes -nokeys -passin pass:&quot;&lt;password&gt;&quot; | openssl x509 -info


Self signed cert


openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt


Add trusted CA

CentOS 7</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemd&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>systemd</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemd&amp;rev=1728939596&amp;do=diff</link>
        <description>Systemd

Systemd Service Commands
CommandDescriptionsystemctl stop service-namesystemd stop running servicesystemctl start service-namesystemctl start servicesystemctl restart service-namesystemd restart running servicesystemctl reload service-namereloads all config files for service</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemdnspawn&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>systemdnspawn</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemdnspawn&amp;rev=1728939596&amp;do=diff</link>
        <description>Systemd-nspawn

En premier lieu on créer un fichier de configuration de dépôt pour CentOS, par exemple dans ~/centos7.repo :


[centos7-base]
name=CentOS-7-Base
baseurl=http://mirror.centos.org/centos/7/os/x86_64
gpgcheck=0


Ensuite on créer un dossier dans lequel dnf va installer tout ce qui est nécessaire, disons dans ~/centos :</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemdtimer&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>systemdtimer</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:systemdtimer&amp;rev=1728939596&amp;do=diff</link>
        <description>Timers

Create a service


[Unit]
Description=IPv6 monitoring

[Service]
User=root
ExecStart=/usr/local/bin/test-ip6

[Install]
WantedBy=basic.target


Create a timer with the same name but suffixed with .timer


[Unit]
Description=Run test-ip6 every 10 minutes

[Timer]
OnBootSec=10min
OnUnitActiveSec=10min
Unit=test.service

[Install]
WantedBy=timers.target</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:tcpdump&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tcpdump</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:tcpdump&amp;rev=1728939596&amp;do=diff</link>
        <description>TCPDump

First The Basics

The following command uses common parameters often seen when wielding the tcpdump scalpel.


:~$ sudo tcpdump -i eth0 -nn -s0 -v port 80

-i : Select interface that the capture is to take place on, this will often be an ethernet card or wireless adapter but could also be a vlan or something more unusual. Not always required if there is only one network adapter.
-nn : A single (n) will not resolve hostnames. A double (nn) will not resolve hostnames or ports. This is han…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:tcp_ip&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tcp_ip</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:tcp_ip&amp;rev=1728939596&amp;do=diff</link>
        <description>Tweak retries

	*  SYN-SENT: The duration of this state can be controlled by TCP_SYNCNT or tcp_syn_retries.
	*  SYN-RECV: It&#039;s usually hidden from application. It is tuned by tcp_synack_retries.
	*  Idling ESTABLISHED connection, will never notice any issues. A solution is to use TCP keepalives.</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ulimit&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ulimit</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:ulimit&amp;rev=1728939596&amp;do=diff</link>
        <description>Ulimit

Les différents paramètres

J’ai parlé ci-dessus de CPU et de RAM, cependant ulimit permet de définir bien d’autres limites que celle-ci. D’ailleurs, on entend souvent parler de la limite des max open files qui nécessite d’être augmentée pour le bon fonctionnement de certains logiciels (mongoDB par exemple).
Sans surprise, la commande qui vous permet de controller tout ça s’appelle ulimit. L’option -a permet d’afficher les réglages pour l’utilisateur courant.</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:vim&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vim</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:vim&amp;rev=1728939596&amp;do=diff</link>
        <description>Vim GODLIKE

Cheatsheet

[Vim Cheatsheet]

Tips

If you want to add execute rights on the file in your current buffer without leaving Vim, you could simply run 


:!chmod u+x %


You can use system cli to modify the current buffer. 


:%!&lt;command&gt;


Two examples:


:%!sort -k3 - sort the buffer based on column 3
:%!column -t - format the text in columns (useful when working with tabular data)</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:virtualbox&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>virtualbox</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:virtualbox&amp;rev=1728939596&amp;do=diff</link>
        <description>VirtualBox

Change the serial number of a VM:


VBoxManage setextradata &quot;VM name&quot; VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial string:serialnumber</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:vmware&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>vmware</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:vmware&amp;rev=1728939596&amp;do=diff</link>
        <description>VMware

Core configuration</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:wifi&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>wifi</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:wifi&amp;rev=1728939596&amp;do=diff</link>
        <description>WiFi

Save a networkmanager secret in the keyring


echo -n &quot;$passphrase&quot; | /usr/bin/secret-tool store --label=${ssid}/802-1x/private-key-password xdg:schema org.freedesktop.NetworkManager.Connection setting-name 802-1x connection-uuid ${uuid} setting-key private-key-password</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:windows&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>windows</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:windows&amp;rev=1728939596&amp;do=diff</link>
        <description>Windows

Licence

Get OEM licence


cat /sys/firmware/acpi/tables/MSDM</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:xrandr&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>xrandr</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=cheatsheet:xrandr&amp;rev=1728939596&amp;do=diff</link>
        <description>Xrandr

Display management


xrandr --listactivemonitors
# Examples
xrandr --output DP2 --auto --left-of eDP1    
xrandr --output eDP1 --auto --off
xrandr --output DP-0 --auto -r 144 --rotate right --pos 0x0
xrandr --output DVI-D-0 -r 144 --right-of DP-0 --pos 1080x840</description>
    </item>
</rdf:RDF>
