<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.kamaradski.com/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="https://wiki.kamaradski.com/feed.php">
        <title>wiki.kamaradski.com - cheatsheet</title>
        <description></description>
        <link>https://wiki.kamaradski.com/</link>
        <image rdf:resource="https://wiki.kamaradski.com/lib/exe/fetch.php?media=wiki:logo.png" />
       <dc:date>2026-04-04T09:07:01+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:apt&amp;rev=1719098792&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:awscli&amp;rev=1676327653&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:certbot&amp;rev=1676327580&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:cloudflared&amp;rev=1690190089&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:docker&amp;rev=1690189209&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:genericcli&amp;rev=1699793527&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:git&amp;rev=1690188389&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:haproxy&amp;rev=1676361997&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:linux_basic_file_manipulation&amp;rev=1676330196&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:multipass&amp;rev=1676362139&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:networking&amp;rev=1676362499&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:proxmox&amp;rev=1676363009&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:sftp&amp;rev=1676364167&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:ssh&amp;rev=1676982247&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:terraform&amp;rev=1729518806&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:ufw&amp;rev=1676370174&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.kamaradski.com/doku.php?id=cheatsheet:wireguard&amp;rev=1676371035&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.kamaradski.com/lib/exe/fetch.php?media=wiki:logo.png">
        <title>wiki.kamaradski.com</title>
        <link>https://wiki.kamaradski.com/</link>
        <url>https://wiki.kamaradski.com/lib/exe/fetch.php?media=wiki:logo.png</url>
    </image>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:apt&amp;rev=1719098792&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-06-22T23:26:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apt</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:apt&amp;rev=1719098792&amp;do=diff</link>
        <description>apt command cheatsheet

check apt history for manually installed packages


$ zgrep &#039;Commandline: apt&#039; /var/log/apt/history.log /var/log/apt/history.log.*.gz


upgrade all packages


$ sudo apt update &amp;&amp; sudo apt full-upgrade (=&gt; ubuntu &amp; debian)
$ sudo apk update &amp;&amp; sudo apk upgrade (=&gt; alpine)</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:awscli&amp;rev=1676327653&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-13T22:34:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>awscli</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:awscli&amp;rev=1676327653&amp;do=diff</link>
        <description>awscli command cheatsheet

awscli official documentation

aws cli-tool

create a new credentials profile in .aws


$ aws configure --profile prod-core


execute a command with a specific profile


$ aws --profile prod-core &lt;command&gt; &lt;subCommand&gt;


execute a command with a specific profile</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:certbot&amp;rev=1676327580&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-13T22:33:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>certbot</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:certbot&amp;rev=1676327580&amp;do=diff</link>
        <description>certbot command cheatsheet

Certbot official site

install certbot


$ sudo apt install certbot


install cloudflare dns validation plugin


$ pip install cloudflare


issue new certificate for a domain, using cloudflare DNS validation


certbot certonly \
  --agree-tos \
  --manual-public-ip-logging-ok \
  --renew-by-default \
  --dns-cloudflare \
  --dns-cloudflare-credentials ~/cloudflare.ini \
  -d *.example.com

  For cloudflare DNS validation to work you need the an API Token in ~/cloudfla…</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:cloudflared&amp;rev=1690190089&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-24T09:14:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cloudflared</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:cloudflared&amp;rev=1690190089&amp;do=diff</link>
        <description>cloudflared command cheatsheet

official documentation

configuration location: `.cloudflared/` folder in your user homefolder

allow non-root to operate docker


// list all tunnels on this host
$ cloudflared tunnel list

// get extended information about a tunnel on this host
$ cloudflared tunnel info tunnelname

// install a tunnel as a service (get exact command from zero-trust UI
$ sudo cloudflared service install &lt;use id from cloudflare goes here&gt;

// status of the tunnel service
$ systemc…</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:docker&amp;rev=1690189209&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-24T09:00:09+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>docker</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:docker&amp;rev=1690189209&amp;do=diff</link>
        <description>docker command cheatsheet

install docker on Debian

allow non-root to operate docker

Per default, the docker commands can only be run by root, in order to allow another user to fully operate docker you need to make the following changes.


// add your user to docker usergroup
$ sudo usermod -aG docker yourusername

// to make this effective login/logout or start a new terminal session with:
$ su yourusername

// test-1 (should see the docker usergroup listed here):
$ id yourusername

// test-2…</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:genericcli&amp;rev=1699793527&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-12T12:52:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>genericcli</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:genericcli&amp;rev=1699793527&amp;do=diff</link>
        <description>generic cli command cheatsheet

OS version

find debian dist version


$ cat /etc/debian_version
11.5


find ubuntu dist version


$ lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:git&amp;rev=1690188389&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-24T08:46:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>git</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:git&amp;rev=1690188389&amp;do=diff</link>
        <description>git command cheatsheet

unstage files (if you have &quot;git add&quot; the wrong file)


git restore --staged some.file


revert 1 or more local commits (not yet pushed)


$ git reset --soft HEAD~1

Unstaged changes after reset:
D	somefolder/somefile
M	somefolder/someother.file</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:haproxy&amp;rev=1676361997&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T08:06:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>haproxy</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:haproxy&amp;rev=1676361997&amp;do=diff</link>
        <description>haproxy command cheatsheet

haproxy official documentation

start haproxy in the foreground to see the exact error messages


$ haproxy -f /etc/haproxy/haproxy.cfg -db

[NOTICE] 300/184912 (7292) : haproxy version is 2.2.9-2+deb11u3
[NOTICE] 300/184912 (7292) : path to executable is /usr/sbin/haproxy
[ALERT] 300/184912 (7292) : Starting frontend http-in: cannot bind socket [10.0.0.49:80]
[ALERT] 300/184912 (7292) : Starting frontend http-in: cannot bind socket [10.0.0.49:443]
[ALERT] 300/184912 …</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:linux_basic_file_manipulation&amp;rev=1676330196&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-13T23:16:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux_basic_file_manipulation</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:linux_basic_file_manipulation&amp;rev=1676330196&amp;do=diff</link>
        <description>linux basic file manipulation command cheatsheet

filesystem navigation


# see current folder:
$ pwd

# change folder forward:
$ cd Documents/ # one level
$ cd Documents/financereports/ # 2 levels

# change folder:
$ cd .. #one level
$ cd ../../.. # jump 3 levels back
$ cd ../Documents # jump 1 level back, and 1 level up again</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:multipass&amp;rev=1676362139&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T08:08:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>multipass</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:multipass&amp;rev=1676362139&amp;do=diff</link>
        <description>multipass command cheatsheet

edit disksize


$ multipass stop instancename
$ multipass get local.instancename.disk
5.0GiB

$ multipass set local.instancename.disk=10GiB
$ multipass start instancename
$ multipass info instancename
Name:           instancename
State:          Running
IPv4:           192.168.64.3
Release:        Ubuntu 22.04.1 LTS
Image hash:     4fd777cb9295 (Ubuntu 22.04 LTS)
Load:           0.10 0.03 0.01
Disk usage:     3.9G out of 9.5G
Memory usage:   152.9M out of 961.9M
Mou…</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:networking&amp;rev=1676362499&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T08:14:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>networking</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:networking&amp;rev=1676362499&amp;do=diff</link>
        <description>networking command cheatsheet

list all ip addresses


$ ip a
OR
$ ifconfig
OR
$ ipconfig (windows)

1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp1s0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default…</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:proxmox&amp;rev=1676363009&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T08:23:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>proxmox</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:proxmox&amp;rev=1676363009&amp;do=diff</link>
        <description>proxmox command cheatsheet

containers (LXC)

list containers


$ pct list
VMID       Status     Lock         Name
200        running                 proxy
201        running                 adguard
202        running                 wireguard
203        running                 unifi</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:sftp&amp;rev=1676364167&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T08:42:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sftp</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:sftp&amp;rev=1676364167&amp;do=diff</link>
        <description>sftp command cheatsheet

login to sftp, using separate keyfile


$ sftp -i /home/ubuntu/.ssh/yourprivatekeyfile loginname@ssome.server.com

sftp&gt;


create list of available files &amp; folders on remote sftp


echo ls -alt | sftp someserver &gt; somehost_available_files.txt

Connected to someserver.</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:ssh&amp;rev=1676982247&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-21T12:24:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssh</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:ssh&amp;rev=1676982247&amp;do=diff</link>
        <description>ssh command cheatsheet

what are ssh and sshd

SSH (Secure Shell) is a network protocol that provides secure communication between two computers, typically a client and a server. It is commonly used to enable remote access and management of a server or other networked device. The SSH protocol encrypts all traffic between the client and the server, making it resistant to eavesdropping, tampering, and other forms of network attacks.</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:terraform&amp;rev=1729518806&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-21T13:53:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>terraform</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:terraform&amp;rev=1729518806&amp;do=diff</link>
        <description>terraform command cheatsheet

run any terraform command with a specific .aws profile name

in your awscli config


[prod]
aws_access_key_id = abcde1234
aws_secret_access_key = abcde1234
[stage]
aws_access_key_id = abcde1234
aws_secret_access_key = abcde1234</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:ufw&amp;rev=1676370174&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T10:22:54+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ufw</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:ufw&amp;rev=1676370174&amp;do=diff</link>
        <description>ufw firewall command cheatsheet

allow rules


$ sudo ufw allow 12345/udp
Rules updated
Rules updated (v6)

$ sudo ufw allow ssh
Rules updated
Rules updated (v6)


ufw enable / disable


$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup</description>
    </item>
    <item rdf:about="https://wiki.kamaradski.com/doku.php?id=cheatsheet:wireguard&amp;rev=1676371035&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-14T10:37:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>wireguard</title>
        <link>https://wiki.kamaradski.com/doku.php?id=cheatsheet:wireguard&amp;rev=1676371035&amp;do=diff</link>
        <description>wireguard command cheatsheet

create private &amp; public key files


$ wg genkey | tee privatekey | wg pubkey &gt; publickey

$ ls
total 16
drwx------  2 root root 4096 Nov 25 22:15 .
drwxr-xr-x 65 root root 4096 Nov 25 22:08 ..
-rw-r--r--  1 root root   45 Nov 25 22:15 privatekey
-rw-r--r--  1 root root   45 Nov 25 22:15 publickey

You should however limit access to these :
$ chmod 600 *key

$ ls -al
total 16
drwx------  2 root root 4096 Nov 25 22:15 .
drwxr-xr-x 65 root root 4096 Nov 25 22:08 ..
-rw…</description>
    </item>
</rdf:RDF>
