“Could not resolve host” error

If you get this error message when trying to update the system (see example below) or just pinging an external host … $> sudo pacman -Syu :: Synchronizing package databases… error: failed retrieving file ‘core.db’ from mirror.archlinuxarm.org : Could not resolve host: mirror.archlinuxarm.org error: failed to update core (download library error) error: failed retrieving file ‘extra.db’ […]

Download password protected file over shell

Therefore we use wget: wget -O outputfile.txt –user sheldon –ask-password https://ask-sheldon.com/genius-stuff.html # f.e. REST wget –http-user USER –http-password PASSWOR http://ask-sheldon.com/import.txt # HTACCESS protection If you let -O param out the output will be stored under its original name.

Get MAC address from file system

On Debian based Linux distributions you can get the MAC address of the respective network adapter from the filesystem like shown below: $> cat /sys/class/net/wlan0/address # WLAN adapter $> 81:82:83:4:85:86 $> cat /sys/class/net/eth0/address # LAN adapter $> 1a:1b:1c:1d:1e:1f As you can see, all adapters have their own folder under  /sys/class/net/ that contains  a address file with the corresponding MAC […]

Set static IP

Sometimes its necessary that your machine gets a static IP-address. For example if you want to run a server or a other service on that machine. On Debian based machines you can do this by: Edit /etc/network/interfaces (f.e.: with nano) auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.88.6 netmask 255.255.255.0 […]

Shred files – securely delete files, folders or partitions

To shred files or partitions securely: $> shred -vun <loops> <File1> <File2> $> shred -vzn <loops> <Device> loop is the count of the loop beginning with 0 (3 means 4-times)!!! You can get the partition table as described in List of partitions or List, partitioning and format drives. If you want to shred a directory recursively, you […]

List, partitioning and format drives

List all devices: $> sudo fdisk -l That will give you an overview about all your drives like that: Disk /dev/sda: 256.1 GB, 256060514304 bytes 255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): […]