06 Sep 2016
SSH keys are important in different authentication mechanisms.
Developers mostly use them for git authentication to a remote repository.
ssh-keygen it is possible to create a so called key pair.
One is the private key, which stays untouched on your disk, and the other one is the public key.
The second one is the one you need to store on the server you want to authenticate yourself.
This could be a site like GitHub for example.
ssh-keygen creates a key pair.
cat ~/.ssh/id_rsa.pub can be used to view the public key directly in the terminal.
Of course you can open this file with any other editor.
If any website demands a public SSH key, the contents of this file is what you need to copy paste.
26 Aug 2016
This post is about how to basically pack a whole volume (like any partition) into a so called image file.
This is mostly used to create image files from bootable CD or DVD installation media.
First take a look at all volumes.
Use this command on macOS:
On Linux, you have to use one of the following:
fdisk -l or
The next command copies bit by bit of the source volume to a target image file:
sudo dd if=[path/to/source/volume] of=[path/to/image/file.img] bs=1m
Here’s an example:
sudo dd if=/dev/rdisk# of=~/Desktop/image.img bs=1m, where # is the volume’s index.
17 Aug 2016
On Linux and macOS it is possible to create reference files, so calles symbolic links, that point on a file on the filesystem.
This is handy if you want e.g. to have a folder holding symbolic links to different applications.
Here’s the command for this:
ln -s /original/file /symbolic/link
17 Jul 2016
The terminal is powerful, but sometimes a graphical window can be handy.
While working with the terminal, you might want to open the current working directory in your windows manager, Explorer for Windows, Finder for macOS or Nautlius for a GNOME-powered Linux.
- Linux (Nautilus):
10 Jul 2016
For security reasons, or in case you want to sell your hard drive, formatting the disk is not enough.
The reason lies in the formatting process itself: formatting only resets the content list of a drive.
Your data is still written on the disk, as long as you do not overwrite them.
There are different apps providing different overwriting strategies.
The following simple comand overwrites a disk once with a random sequence of 0s and 1s:
cat /dev/random > /dev/disk[X]
X is here the index of the disk you want to overwrite.
you can list all your partitions.