<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://lunetikk.de/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://lunetikk.de/feed.php">
        <title>Lunetikk's IT Wiki linux:general</title>
        <description></description>
        <link>https://lunetikk.de/</link>
        <image rdf:resource="https://lunetikk.de/lib/tpl/mindthedark/images/favicon.ico" />
       <dc:date>2026-04-19T16:08:24+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:awk&amp;rev=1570798868&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:basics&amp;rev=1671183704&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:crontab&amp;rev=1570438776&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:ffmpeg&amp;rev=1682795817&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:firefox&amp;rev=1572300355&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:git&amp;rev=1513699930&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:iptables&amp;rev=1644416783&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:lvm&amp;rev=1605544752&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:mailq&amp;rev=1527511181&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:md5&amp;rev=1573808782&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:mkv&amp;rev=1768900154&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:mount&amp;rev=1578584209&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:mysql&amp;rev=1578951064&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:network&amp;rev=1671184293&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:putty&amp;rev=1575994303&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:qol&amp;rev=1674408006&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:resetroot&amp;rev=1662216537&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:ssh&amp;rev=1545324264&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:sslcert&amp;rev=1544214911&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:sudoers&amp;rev=1661933942&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:swap&amp;rev=1549979149&amp;do=diff"/>
                <rdf:li rdf:resource="https://lunetikk.de/doku.php?id=linux:general:troubleshooting&amp;rev=1607004747&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://lunetikk.de/lib/tpl/mindthedark/images/favicon.ico">
        <title>Lunetikk's IT Wiki</title>
        <link>https://lunetikk.de/</link>
        <url>https://lunetikk.de/lib/tpl/mindthedark/images/favicon.ico</url>
    </image>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:awk&amp;rev=1570798868&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-11T15:01:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:awk</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:awk&amp;rev=1570798868&amp;do=diff</link>
        <description>AWK

30 Examples for Awk Command in Text Processing</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:basics&amp;rev=1671183704&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-12-16T10:41:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:basics</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:basics&amp;rev=1671183704&amp;do=diff</link>
        <description>Linux Commands
  Command    Function    cd {/folder/}    cd (change directory), changes the current directory to folder    pwd    shows current directory    ls    shows all files and folders in the current directory in one line -&gt; confusing)    ll    = ls –al</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:crontab&amp;rev=1570438776&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-07T10:59:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:crontab</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:crontab&amp;rev=1570438776&amp;do=diff</link>
        <description>Cron

What is Cron/ Crontab/ Cronjob?

Wikipedia - Cron

How to edit a cron

For global use, edit “/etc/cron.d/general”

For a specific user, execute “crontab -e” with that user.



 ┌───────────── minute (0 - 59)
 │ ┌───────────── hour (0 - 23)
 │ │ ┌───────────── day of month (1 - 31)
 │ │ │ ┌───────────── month (1 - 12)
 │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday;
 │ │ │ │ │                                       7 is also Sunday)
 │ │ │ │ │
 │ │ │ │ │
 * * * * *  command t…</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:ffmpeg&amp;rev=1682795817&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-04-29T21:16:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:ffmpeg</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:ffmpeg&amp;rev=1682795817&amp;do=diff</link>
        <description>FFmpeg

	&quot;FFmpeg is a free software project consisting of a vast software suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the FFmpeg program itself, designed for command-line-based processing of video and audio files, and widely used for format transcoding, basic editing (trimming and concatenation), video scaling, video post-production effects, and standards compliance (SMPTE, ITU). FFmpeg includes libavcodec, an audio/video code…</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:firefox&amp;rev=1572300355&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-28T23:05:55+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:firefox</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:firefox&amp;rev=1572300355&amp;do=diff</link>
        <description>Firefox

Installation


apt-get install firefox


Configuration

You can set different Useragents (about:config) via configfile

Change to the dir, the defaultname is different for everybody

cd /home/&lt;USERNAME&gt;/.mozilla/firefox/*default/


The default config is located in</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:git&amp;rev=1513699930&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-19T17:12:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:git</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:git&amp;rev=1513699930&amp;do=diff</link>
        <description>Git

Commands
  Command    Function    git log --follow check_symlink    shows the change history of the file “check_symlink”    git remote -v    verify the remote url (origin) of the current repository    git config --global user.email “&lt;MAIL&gt;</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:iptables&amp;rev=1644416783&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-02-09T15:26:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:iptables</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:iptables&amp;rev=1644416783&amp;do=diff</link>
        <description>IPTables

Configure

List rules



iptables -L
#or
iptables -L -n



Add rule



#reject connections
iptables -A &lt;CHAIN&gt; -d &lt;IP&gt;/32 -j REJECT --reject-with icmp-port-unreachable



Remove rule



#list rules in chain
iptables -L &lt;CHAIN&gt; --line-numbers

#remove line 1 in chain
iptables -D &lt;CHAIN&gt; 1</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:lvm&amp;rev=1605544752&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-11-16T17:39:12+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:lvm</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:lvm&amp;rev=1605544752&amp;do=diff</link>
        <description>Logical Volume Manager (LVM)

What is LVM?

Wikipedia - Logical Volume Manager

Create new Physical Volume (PV), Volume Group (VG) and Logical Volume (LV)

First you need to create a partition on a disk with type LVM

List the partitions



cat /proc/partitons

major minor  #blocks  name

  11        0    1048575 sr0
   8        0   31457280 sda
   8        1     194560 sda1
   8        2   31260672 sda2
   8       16  209715200 sdb</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:mailq&amp;rev=1527511181&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-05-28T14:39:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:mailq</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:mailq&amp;rev=1527511181&amp;do=diff</link>
        <description>Remove mails from mailqueue

Postfix

Remove mails



service postfix stop
postsuper -d ALL 
mailq 
service postfix start



Sendmail

Remove mails

Remove some mails:


service sendmail stop
rm /var/spool/mqueue/*
rm /var/spool/mqueue-client/*
mailq 
service sendmail start</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:md5&amp;rev=1573808782&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-11-15T10:06:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:md5</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:md5&amp;rev=1573808782&amp;do=diff</link>
        <description>MD5

Get MD5 sums of files

Execute the following script to get md5 sums of multiple files in dir /VMDKS/lunetikk/


#!/bin/bash

SYSTEM=lunetikk

touch /tmp/md5sums-$SYSTEM.txt

for file in /VMDKS/$SYSTEM/*
do
md5sum $file &gt;&gt; /tmp/md5sums-$SYSTEM.txt
done</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:mkv&amp;rev=1768900154&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-20T10:09:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:mkv</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:mkv&amp;rev=1768900154&amp;do=diff</link>
        <description>Edit .mkv

To edit these files, install mkvtoolnix and ffmpeg

Issues

Videos are working in VLC but not on TV - rebuild the container (Repack)


 ffmpeg -i input.mkv -map 0 -c copy -fflags +genpts output_fixed.mkv</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:mount&amp;rev=1578584209&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-01-09T16:36:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:mount</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:mount&amp;rev=1578584209&amp;do=diff</link>
        <description>Mount networkshares

Clientpackages to mount shares

CIFS:


apt-get install cifs-utils


NFS:


apt-get install nfs-common


Temp. mount

CIFS / SAMBA



mount -t cifs //&lt;SRV&gt;/&lt;SHARE&gt;/ /mnt/&lt;POINT&gt;/


or with connection parameters


mount -t cifs //&lt;SRV&gt;/&lt;SHARE&gt;/ /mnt/&lt;POINT&gt;/ -o username=user,password=pass,domain=dom</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:mysql&amp;rev=1578951064&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-01-13T22:31:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:mysql</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:mysql&amp;rev=1578951064&amp;do=diff</link>
        <description>MySQL

Install



apt-get install mysql-server



Configure

Execute the following after the installation

mysql_secure_installation


You can find the config in


/etc/mysql/mysql.conf.d/mysqld.cnf



Passwordless login

If you want to automate things you might want to login without a plaintext password.</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:network&amp;rev=1671184293&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-12-16T10:51:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:network</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:network&amp;rev=1671184293&amp;do=diff</link>
        <description>Network

Ports
PortProtocol  20 + 21    FTP    22    SSH    25    SMTP    80    HTTP    111 + 2049    TCP/UDP - NFS    123    UDP - NTP    137 + 139 + 445    TCP/UDP - SMB/Samba    443    HTTPS    8080    Proxy    3389    RDP    3306    MySQL  
Configuration</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:putty&amp;rev=1575994303&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-12-10T17:11:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:putty</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:putty&amp;rev=1575994303&amp;do=diff</link>
        <description>PuTTY

Download

PuTTY

This is the most common client

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

KiTTY

This client is PuTTY with some extra features which are really helpful

http://kitty.9bis.net/

Configuration

SSH Key

Download “puttygen”

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

- Select SSH-2 RSA

- 2048 bit or higher

- Click generate

- Edit comment</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:qol&amp;rev=1674408006&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-01-22T18:20:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:qol</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:qol&amp;rev=1674408006&amp;do=diff</link>
        <description>Quality of life improvements

VI

Install VIM



apt install vim



Deactivate visual mode



echo &quot;set mouse-=a&quot; &gt;&gt; ~/.vimrc



Shell

Use alias

Use an alias to make long commands you need often short

open /etc/.bashrc and add lines like the following</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:resetroot&amp;rev=1662216537&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-09-03T16:48:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:resetroot</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:resetroot&amp;rev=1662216537&amp;do=diff</link>
        <description>Reset Root Password

Reboot your system and press “e” in GRUB



Replace the second last line starting from “ro” to the following



rw init=/bin/bash





Then press “F10” to boot

You should see a rootshell just like this



Enter “passwd</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:ssh&amp;rev=1545324264&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-12-20T17:44:24+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:ssh</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:ssh&amp;rev=1545324264&amp;do=diff</link>
        <description>SSH

Installation



apt-get install openssh-server



Configuration

In “/etc/ssh/sshd_config”


PermitRootLogin no
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication yes




service ssh restart</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:sslcert&amp;rev=1544214911&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-12-07T21:35:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:sslcert</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:sslcert&amp;rev=1544214911&amp;do=diff</link>
        <description>SSL Certs

Check the following sites:

Certbot / LetsEncrypt

tmade.de apache</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:sudoers&amp;rev=1661933942&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-31T10:19:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:sudoers</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:sudoers&amp;rev=1661933942&amp;do=diff</link>
        <description>Sudoers

Configuration

In “/etc/sudoers”


#allow user &quot;user1&quot; to become root via &quot;sudo su -&quot;
user1 ALL=(ALL) NOPASSWD: ALL

#allow user &quot;nagios&quot; to execute the script &quot;check_fail2ban&quot; with root privileges
nagios        ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_fail2ban</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:swap&amp;rev=1549979149&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-02-12T14:45:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:swap</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:swap&amp;rev=1549979149&amp;do=diff</link>
        <description>Swap

What is Swap?

Wikipedia - Paging

Create a (temp.) swapfile and add it to swap

Create a swapfile with blocksize 1024 and 2GB

dd if=/dev/zero of=/swap/swapfile bs=1024 count=2M

Format the file and set permissions


mkswap /swap/swapfile
chown root:root /swap/swapfile
chmod 600 /swap/swapfile</description>
    </item>
    <item rdf:about="https://lunetikk.de/doku.php?id=linux:general:troubleshooting&amp;rev=1607004747&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-12-03T15:12:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:general:troubleshooting</title>
        <link>https://lunetikk.de/doku.php?id=linux:general:troubleshooting&amp;rev=1607004747&amp;do=diff</link>
        <description>Troubleshooting

Removing old kernels leads to broken symlinks

Description

apt-get autoremove leads to a broken symlink which requires a reload of grub



apt-get autoremove
...
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
 you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
 you may need to re-run your boot loader[grub]</description>
    </item>
</rdf:RDF>
