Linux

Tar and un-tar files on linux

Create tar.gz tar -czf destination.tar.gz folder-file-to-compress/ Extract tar.gz tar -xzf file.tar.gz

SSH/SCP from the cli

SSH ssh user@server-fqdn-or-ip SCP Get a file scp user@server-fqdn-or-ip:/home/ubuntu/file-to-get.tar.gz local-save-to-dir Send a file scp .\file-to-send.tar.gz user@server-fqdn-or Connection with an explicit identity file By default the commands try to use ~/.ssh/id_rsa as the ident...

SSH host key changed

Recently I have changed the web server for my codesie.ch web site. After the dns change to the ip of the new server, my ssh connection attempt failed with the following error: js@worker:~$ ssh codesie.ch @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOO...

Open remote desktop session from linux

Personally, I am using Linux Mint. But for work, I need to connect to my Windows 10 PC from work. I use two ways to achieve this. Remmina The easiest way ist to install Remmina. sudo apt-get install remmina And we are ready to connect to our Windows client, by opening remmina. My only strugg...

Install personal CA

I needed to install a personal CA certificate on my Linux Mint computer, which I did like this: mkdir /usr/share/ca-certificates/extra/ sudo cp Fortinet_CA_SSL.crt /usr/share/ca-certificates/extra/ sudo dpkg-reconfigure ca-certificates) After the last command, you need to select your CA. Afterwa...

Extend harddisk size of Linux

The hypervisor Proxmox gives you the ability to extend virtual harddisks of your virtual machines. This “How To” explains how to extend the virtual disk of a virtualized Linux. Information The virtual machine is a Linux Debian 9.6 which uses the filesystem ext4. The disk will be extended from 21...

Convert .cer to .crt file

I had a certificate in the .cer format, which I wanted to install as a trusted certificate authority on my Linux Mint computer. I found some articles online, which showed, how to install a personal CA certificate, but these guides always used .crt files. I followed these articles with my .cer file,...

Check for storage space eaters

df Get an overview of the file system disk space usage. sudo df -h The result can looks similar to this. Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 800M 4.6M 795M 1%...

Activate HTTPS with Let's Encrypt

This article shows quickly, how HTTPS was activated for codesie.ch. A much more detailed and very good article can be found here. Install requirements sudo apt install certbot python3-certbot-apache Prepare vhosts file The virtual hosts file (ex. /etc/apache2/sites-enabled/codesie.conf) ne...

Restore a file with Deja Dup (CLI)

You accidentally deleted a file, which you should not have. In this example, the file is called “Bearbeiten-DNS Server aufsetzen.docx”. First of all, we have to be in the directory, where the file was stored. Restore command sij@codesie:/mnt/linuxData/02_Codesie-IT-Solutions/Sijtech-Wissensartik...

Revert a file with Deja Dup (CLI)

You accidentally changed the content of a file and need to revert to an older version. In this example, the content of the file “Bearbeiten-DNS Server aufsetzen.docx” has been deleted and we want to restore it. First of all, we have to be in the directory, where the file is stored. Revert command...