Latest 10 recent news (see index)


December 12, 2018

The Advent of Void: Day 12: redshift

If you stay up late working on packages and system security patches, you may notice after a while your eyes start to hurt. This is likely due to too much blue light at night, which studies have shown can cause eye strain. While glasses and monitors that can filter this light out are one solution, you can also adjust values in software to account for this blue light at night.

Doing this by hand is obviously tedious, so there’s an excellent software package called “redshift” which does this adjustment for you.

Once installed from the repos (xbps-install redshift) create a file like so that configures it:

[redshift]
temp-day=5700
temp-night=3200
gamma=0.8
location-provider=manual
elevation-high=24.69

[manual]
lat=39.109489
lon=-76.772980

This file should be in ~/.config/redshift.conf

The fields are pretty self explanatory, with the exception of elevation-high which is the solar elevation in degrees before its considered to be daytime. All temperatures are provided in Kelvin, and the wikipedia page on color temperature has a nice chart showing different values against the common sources of light that produce them.

From here, just start redshift with your session (redshift-gtk if you have an environment that can autostart .desktop files) to enjoy color filtered light at night!


December 11, 2018

The Advent of Void: Day 11: gopass

One very important aspect of our work, until a fully passwordless future can be upon us, is password management. Some people choose to use tools like LastPass, or other online password management schemes. But what do you do if you are really paranoid? Enter, pass, and it’s written-in-go companion with more features: gopass.

We can start our journey with the help of a wizard.

[nakasone@gibson ~]$ gopass
It seems you are new to gopass. Do you want to run the onboarding wizard? [Y/n/q]:
[init] No useable crypto keys. Generating new key pair
[init] [crypto] Key generation may take up to a few minutes
[init] [crypto] Creating key pair ...
[init] [crypto] WARNING: We are about to generate some GPG keys.
[init] [crypto] However, the GPG program can sometimes lock up, displaying the following:
"We need to generate a lot of random bytes."
If this happens, please see the following tips:
https://github.com/gopasspw/gopass/blob/master/docs/entropy.md
Continue? [Y/n/q]:
gpg (GnuPG) 2.2.11; Copyright (C) 2018 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Note: Use "gpg2 --full-generate-key" for a full featured key generation dialog.

GnuPG needs to construct a user ID to identify your key.

Real name: John Smith
Email address: John.Smith@example.com
You selected this USER-ID:
    "John Smith <John.Smith@example.com>"

Change (N)ame, (E)mail, or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: key F90F4F27E8F3BCBE marked as ultimately trusted
gpg: directory '/home/nakasone/.gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/home/nakasone/.gnupg/openpgp-revocs.d/1D9F3C091EB8211439B9F80BF90F4F27E8F3BCBE.rev'
public and secret key created and signed.

pub   rsa2048 2018-12-11 [SC] [expires: 2020-12-10]
      1D9F3C091EB8211439B9F80BF90F4F27E8F3BCBE
uid                      John Smith <John.Smith@example.com>
sub   rsa2048 2018-12-11 [E] [expires: 2020-12-10]

 -> OK

Error: failed to run onboarding wizard: failed to create new private key: failed to create a useable key pair
[nakasone@gibson ~]$

Well, that was weird. But I can do this, let’s try again.

[nakasone@gibson ~]$ gopass init
[init] Initializing a new password store ...
Please select a private key for encrypting secrets:
[0] gpg - 0x6EB42A8FCB19121B - John Smith <John.Smith@example.com>
Please enter the number of a key (0-0, [q]uit) [0]:
[init] Initializing git repository (gitcli) ...
Use John Smith (John.Smith@example.com) for password store git config? [Y/n/q]:
[init] Git initialized
[init] Password store /home/nakasone/.password-store initialized for:
[init]   0x6EB42A8FCB19121B - John Smith <John.Smith@example.com>
[nakasone@gibson ~]$

Now that we have a password store, let’s look at this.

[nakasone@gibson ~]$ gopass
gopass

Anti-climactic to be sure, but let’s try using it a bit. We have a front gate, let’s put in my code.

[nakasone@gibson ~]$ gopass insert front-gate
Enter password for front-gate:
Retype password for front-gate:
Warning: Password is too short

Well, duh, I’ve been telling the guards that 1234 is not a reasonable code! But we have a back gate too.

[nakasone@gibson ~]$ gopass insert back-gate
Enter password for back-gate:
Retype password for back-gate:
Warning: Password is too short

Yes, it’s not acceptable. Cry me a river.

[nakasone@gibson ~]$ gopass
gopass
├── back-gate
└── front-gate

[nakasone@gibson ~]$ gopass audit
Auditing passwords for common flaws ...
Checking 2 secrets. This may take some time ...

2 of 2 secrets checked                                      [################################################] 100.00%
Detected a shared secret for:
        - back-gate
        - front-gate
Password is too short:
        - back-gate
        - front-gate
2018/12/11 00:16:28 found weak passwords or duplicates
[nakasone@gibson ~]$

We need a better gate code. Let’s get one. Security says we can’t have more than 5 characters…

[nakasone@gibson ~]$ gopass generate new-front-gate
How long should the password be? [24]: 5
Do you have strict rules to include different character classes? [y/N/q]:
[nakasone@gibson ~]$ gopass
gopass
├── back-gate
├── front-gate
└── new-front-gate

[nakasone@gibson ~]$ gopass  show new-front-gate
nMzke
[nakasone@gibson ~]$

Well, that should do. We don’t have any time based logins, so we can’t generate otp or totp or hotp tokens to show you, but that’s what there is.

[nakasone@gibson ~]$ gopass rm back-gate
Are you sure you would like to delete back-gate? [y/N/q]: y
[nakasone@gibson ~]$ gopass mv new-front-gate front-gate
front-gate already exists. Overwrite it? [y/N/q]: y
Warning: git has no remote. Ignoring auto-push option
Run: gopass git remote add origin ...
[nakasone@gibson ~]$ gopass
gopass
└── front-gate

As you can see, gopass reminds us our password store isn’t backed up. Well, let’s do that really quickly.

[nakasone@gibson ~]$ gopass git remote add origin git@github.com:void-linux/fortress-pws.git
[nakasone@gibson ~]$ git sync
Sync starting ...
[<root>]
   git pull and push ...
All done
[nakasone@gibson ~]$

Maybe we can also record some of those useful passwords we have learned.

[nakasone@gibson ~]$ gopass insert github/torvalds
Enter password for github/torvalds:
Retype password for github/torvalds:
[nakasone@gibson ~]$ gopass insert github/bob-beck
Enter password for github/bob-beck:
Retype password for github/bob-beck:
[nakasone@gibson ~]$ gopass
gopass
├── github
│   ├── bob-beck
│   └── torvalds
└── front-gate
[nakasone@gibson ~]$ gopass sync
Sync starting ...
[<root>]
   git pull and push ...
All done
[nakasone@gibson ~]$

Tada, we have now created some passwords, and syncronized them with a backup! Like all the people with LastPass, our passwords are safe from a destruction of our computer, and protected with the finest gpg has to offer! So fine, in fact, we can push valuable assets to github, and be assured they will not be read. Of course, the names of those assets, and our organization of them, is still publicly visible:

[nakasone@gibson ~]$ find .password-store
.password-store/.git/ # snip
.password-store/front-gate.gpg
.password-store/github/
.password-store/github/jeremy.gpg
.password-store/github/torvalds.gpg
.password-store/.gpg-id
.password-store/.public-keys
.password-store/.public-keys/0x6EB42A8FCB19121B

Obviously, it might be best to store usernames on one line, and passwords on the second (you can have multiline secrets in gopass). In such a scheme, the identity of the assets or usernames you hold can be better protected. But all of that can be handled with gopass, on your computer, trusting nobody else, and can be scripted however you please. There are gopass plugins for firefox and chrome, but the author has not had any success with testing those.

gopass: With a little bit more work, you can be paranoid and have a password manager too!


December 10, 2018

The Advent of Void: Day 10: nload

nload(1) is a tool to display the current network usage.

nload can be installed from the Void Linux repository:

xbps-install nload

By default, nload monitors all available network interfaces and displays the traffic of the first interface.

$ nload

Device eth0 [192.168.1.10] (1/5):
=========================================================================================
Incoming:







                                          .                             Curr: 1.29 MBit/s
                                          #| .                          Avg: 859.19 kBit/s
                     |                    ##|##             .|||||      Min: 0.00 Bit/s
      |.  .  .      .#.                  |#####|....|#|||#||#######||.  Max: 3.79 MBit/s
||||||## .##.#|.|.. ####| .|#|    ..     #############################  Ttl: 7.71 GByte
Outgoing:
#                                        #############################
#                                        #############################
#                                        #############################
#                                        #############################
#                                        #############################
#                                        #############################
#                                        #############################
#                                        #############################
#                                        #############################  Curr: 43.34 MBit/s
#                                        #############################  Avg: 18.70 MBit/s
#                                        #############################  Min: 0.00 Bit/s
# ||. .|  ..  |.     #.#.          #. .# #############################  Max: 83.02 MBit/s
#########.##.###||| ##### .###. .|###|##|#############################  Ttl: 378.92 MByte

A different interface can be displayed, either by using arrow keys to iterate over the list of interfaces, or by passing the interface name as an argument to nload.

Multiple interfaces can be shown simultaneously, without graphs, by using the -m flag:

$ nload -m wlan0 eth0

Device wlan0 [10.0.0.10] (1/2):
=========================================================================================
Incoming:                                           Outgoing:
Curr: 0.00 Bit/s                                    Curr: 0.00 Bit/s
Avg: 0.00 Bit/s                                     Avg: 0.00 Bit/s
Min: 0.00 Bit/s                                     Min: 0.00 Bit/s
Max: 0.00 Bit/s                                     Max: 0.00 Bit/s
Ttl: 591.50 MByte                                   Ttl: 37.22 MByte

Device eth0 [192.168.1.10] (2/2):
=========================================================================================
Incoming:                                           Outgoing:
Curr: 45.82 kBit/s                                  Curr: 28.70 kBit/s
Avg: 13.97 kBit/s                                   Avg: 6.76 kBit/s
Min: 0.00 Bit/s                                     Min: 0.00 Bit/s
Max: 333.96 kBit/s                                  Max: 61.61 kBit/s
Ttl: 7.83 GByte                                     Ttl: 3.99 GByte

December 09, 2018

The Advent of Void: Day 9: mdbook

Writing documentation often isn’t as much fun as writing code, but in many cases its more important than writing code. Increasingly common it is expected for project documentation to be available online. A well-known tool for converting markdown to html is gitbook, however gitbook is written in nodejs, is slow, and has lots of edge cases where it can break in obscure ways.

Similar to the OpenBSD community, the Rust community likes to re-implement tools at a higher standard. To replace gitbook, the Rust community has written an excellent tool called mdbook.

When you create a new mdbook, a small wizard guides you through the process:

$ mdbook init

Do you want a .gitignore to be created? (y/n)
n
What title would you like to give the book?
Advent of Void
2018-12-08 22:09:54 [INFO] (mdbook::book::init): Creating a new book with stub content

All done, no errors...

The resulting stub book looks like this:

.
├── book
├── book.toml
└── src
    ├── SUMMARY.md
    └── chapter_1.md

2 directories, 3 files

If we were to render this book with mdbook build then the book/ subdirectory would be populated.

$ mdbook build
2018-12-08 22:13:08 [INFO] (mdbook::book): Book building has started
2018-12-08 22:13:08 [INFO] (mdbook::book): Running the html backend
$ tree .
.
├── book
│   ├── FontAwesome
│   │   ├── css
│   │   │   └── font-awesome.css
│   │   └── fonts
│   │       ├── FontAwesome.ttf
│   │       ├── fontawesome-webfont.eot
│   │       ├── fontawesome-webfont.svg
│   │       ├── fontawesome-webfont.ttf
│   │       ├── fontawesome-webfont.woff
│   │       └── fontawesome-webfont.woff2
│   ├── ayu-highlight.css
│   ├── book.js
│   ├── chapter_1.html
│   ├── clipboard.min.js
│   ├── css
│   │   ├── chrome.css
│   │   ├── general.css
│   │   ├── print.css
│   │   └── variables.css
│   ├── elasticlunr.min.js
│   ├── favicon.png
│   ├── highlight.css
│   ├── highlight.js
│   ├── index.html
│   ├── mark.min.js
│   ├── print.html
│   ├── searcher.js
│   ├── searchindex.js
│   ├── searchindex.json
│   └── tomorrow-night.css
├── book.toml
└── src
    ├── SUMMARY.md
    └── chapter_1.md

6 directories, 29 files

The book is now ready for serving and we could copy the book/ subdirectory anywhere we please for serving, even an AWS S3 bucket to be served as a fully static bundle.

Of course, all of the files in book/ are driven by the source files in src/. The SUMMARY.md file is a listing of the structure of the book, and the chapter_1.md is a stub for a single chapter within the book.

All of these files are easy to read markdown. For example, here’s the content of the summary file:

$ cat src/SUMMARY.md
# Summary

- [Chapter 1](./chapter_1.md)

And here’s the content of the stub chapter file:

$ cat src/chapter_1.md
# Chapter 1

The ease of generating documentation books with mdbook means that you can quickly and easily document almost anything. Want to see a more complex example? Check out the Void Documenation which is built with mdbook.


December 08, 2018

The Advent of Void: Day 8: ipcalc

ipcalc is a perl script that helps planning and analyzing IPv4 networking and subnets. It takes an IP address and netmask and calculates various metrics from it. It detects CIDR notation as well as dotted decimals. The latter recognizes even inversed bitmasks as used in Cisco products.

ipcalc can be installed from the Void Linux repository:

xbps-install ipcalc

To analyze an IP in CIDR notation just supply it as first argument

$ ipcalc 192.168.23.12/24
Address:   192.168.178.12       11000000.10101000.10110010. 00001100
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   192.168.178.0/24     11000000.10101000.10110010. 00000000
HostMin:   192.168.178.1        11000000.10101000.10110010. 00000001
HostMax:   192.168.178.254      11000000.10101000.10110010. 11111110
Broadcast: 192.168.178.255      11000000.10101000.10110010. 11111111
Hosts/Net: 254                   Class C, Private Internet

Without a given subnetmask the subnet is automaticly detected using the address range:

$ ipcalc 148.251.199.112/24
Address:   148.251.199.112      10010100.11111011.11000111. 01110000
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   148.251.199.0/24     10010100.11111011.11000111. 00000000
HostMin:   148.251.199.1        10010100.11111011.11000111. 00000001
HostMax:   148.251.199.254      10010100.11111011.11000111. 11111110
Broadcast: 148.251.199.255      10010100.11111011.11000111. 11111111
Hosts/Net: 254                   Class B

If the first bit of the netmask in dotted notation is a zero it assumes an inversed netmask:

$ ipcalc 148.251.199.112 0.0.0.255
WILDCARD
Address:   148.251.199.112      10010100.11111011.11000111. 01110000
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   148.251.199.0/24     10010100.11111011.11000111. 00000000
HostMin:   148.251.199.1        10010100.11111011.11000111. 00000001
HostMax:   148.251.199.254      10010100.11111011.11000111. 11111110
Broadcast: 148.251.199.255      10010100.11111011.11000111. 11111111
Hosts/Net: 254                   Class B

It even can detect invalid netmask. Then ipcalc assumes the default netmask for the IP range:

$ WILDCARD
INVALID NETMASK
INVALID MASK1:   0.255.255.0

Address:   148.251.199.112      10010100.11111011.11000111. 01110000
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   148.251.199.0/24     10010100.11111011.11000111. 00000000
HostMin:   148.251.199.1        10010100.11111011.11000111. 00000001
HostMax:   148.251.199.254      10010100.11111011.11000111. 11111110
Broadcast: 148.251.199.255      10010100.11111011.11000111. 11111111
Hosts/Net: 254                   Class B

ipcalc is a neat script that helps with debugging complex subnet setups and plan your network. If you like to learn more about ipcalc visit the website.


December 07, 2018

The Advent of Void: Day 7: scrot

scrot(1) is a tool for taking screenshots on XWindow systems.

The simplest way to create a screenshot from your desktop is to call the program without arguments

$ scrot
$ ls
2018-12-07-114552_3200x1800_scrot.png

This creates a timestamped png file covering the whole desktop.

scrot allows you to define a target filename as last argument:

$ scrot awesome_screenshot.png
$ ls
awesome_screenshot.png

This creates awesome_screenshot.png instead of an autocreated filename

To screenshot a single window you can either use -s to select the window with the mouse or -u to screenshot the currently focused one. For -u it might be useful to also apply -d 2 to get 2 seconds to focus the desired window.

$ scrot -s
$ ls
2018-12-07-115330_1444x952_scrot.png

If you like to learn more about scrot, please consider reading the manpage.


December 06, 2018

The Advent of Void: Day 6: xlunch

Sometimes its nice to have icons on the desktop, but desktops often come with a lot of other software as part of a full desktop environment that is not desirable for simple setups.

In cases such as these where a kiosk like experience is desired, xlunch really shines. The xlunch launcher is about as small as its possible to get, depending on just Imlib2 and Xorg. The basic idea is to provide a grid of icons to click on and then launch whichever one is clicked on.

Its also possible to use xlunch to create menu driven systems by specifying alternate files for the icons and options, which will allow you to quickly create graphical wizards with minimal effort.

For more information, see the xlunch website.


December 05, 2018

The Advent of Void: Day 5: surf

Note: the author of this article is the former maintainer of the surf browser.

surf(1) is a simplistic webkit2 based browser. The characteristic that sets surf appart from other browsers are the features it lacks. surf neither has support for bookmarks nor browser history nor plugins. That leads to a very different workflow in contrast to other browsers.

With browsers like Firefox or Chrome you open the browser once and leave it there. With surf it’s intended to call it from command line, do a task and close the browser once you finished. It’s much like using a pdf reader for websites. This leads to a distraction free and focused experience.

To visit the voidlinux homepage just open:

$ surf voidlinux.org

surf-2.0

You can use vi-like keybindings like Ctrl-h and Ctrl-l to go back and forth in the browser history and use Ctrl-j and Ctrl-k to scroll up and down.

It supports a user defined javascript file to alter the look of pages to your needs. For that create ~/.surf/script.js and add javascript in there. This code will be called on every new page that is opened in surf.

Similiar the browser also support custom stylesheets. For that create a new file with the name ~/.surf/styles/default.css This css file will be loaded and allows to set custom color themes for websites.

surf has a comprehensive manual page and for further reading you can also visit the website.


December 04, 2018

The Advent of Void: Day 4: pwgen

pwgen(1) is a small tool to generate passwords that can easily be memorized by humans.

In the default configuration pwgen will generate a table of 8 character passwords.

$ pwgen
oePa1oox tidoo4Ig WaiK2goh Ga6yei2t Enois1ch aeraf6Ai Heafu8xa aiT4iung
Ohthoo3a siequ2Ah ied4luiS ee0daiCa ooQu8ohl ooBaiCh7 Xohng3if Phei2leo
kei4AMie ieCh6yoo OiB0Heth vaeh4Ji5 aebiY5Su Que5iQuo Aewahn6o noo5AV0e
Ahbei9ul Caigh7lo Chiez3ou Faeng2ph eiXei9ee eex2DohN shoath5N haish3Vi
aeTh9taa Cephee8o ioz8Ohta Ush8aej1 tai4eiN3 Vae3Mai7 uipaiL4l geZ7fa7E
dii9Ahng uoHui2sh Pue9Faep uchoe6Ea AhrooTh9 mohz5Eim iem6Eim8 OoGoh6oi
Iey6ahy5 thoe6Aiv Od8ye9mi eS8eeCoo Thoih1Ai zogheiB4 uChah7ce EeBai8ai
kir8ePua xohBah0b iem3Chuo tah6vuPi oi3Ukuew ohZ5aeng iec2eiTh AhGaeMo4
tuTeiG9e Shah8Oow eey2eeZi Kaicoh2e oiGie2ai cuB5da7o aesh9Kei eejeVai8
dah2iQua Ahb5eequ Wai2ood3 eTou8noo queep5Ei oong6Egh rae8auFi hee9Aiha
uiF9eego Iudu1aej Eeng0eiy lie9Ohmo Lee1ieku AhW3johz Oph0eung adu6Ohph
se3Ieviu KohBee3v Siej9iep uac6Jaip choh3Thi el9zaaDa vi0loh7E Thoush9w
ieHai0oi moP1Ohtu ieShe8ro rei9Tha1 oi0Daigh zovei3Tu Uwooj0mu eeL4Baik
phoo8aeG Ciephee5 foy1rohN Gue4vie6 Xoh7bie9 eF6feime Vi1av6ch yieNo2uv
ye1NahHa ti2eVeek OiWaeyi1 eiy4Iech kie2Giek Ui5ahjai Aehoh2go iv5vaiWu
zee3Xied Ubuo2soo eex6vahV aineM0Oo Ainoex9i Ahje7zo6 Daid0oum Fu2dooPh
Reb6fulu leLoh1qu Een4ohzo Leip8ieb eeRoht8i koCohd5d ii9Oo6zi Seem5ohS
OonaH0je ooquieK1 Daet5wae AhthieV6 EiD4wieg Oot8gohn IezoRie2 biuN4die
nishieX6 Tie3beiy uNg3zaef xeiSe2tu shei8uMo oWah0Wee eCahch1a jieL0fei
EeYo6Sha EMushoh1 ahY2Ooba Ai1iitha mo8suChe ohX4jaep PhiThef7 fee1Fain

If the output is not a tty pwgen will generate just one password for you. This eases the use of pwgen in scripts:

$ export PASSWORD=$(pwgen)
$ echo $PASSWORD
Yah6Pho4

For longer (or shorter) passwords pwgen will read the password length from the first parameter:

$ pwgen 32
iengiaB6ahg6Egh9awaephaeX8jobip0 kec9sha8bohmooNg4AthiShiex0ahKem
zoogeiw5eiJahthae5Aephae6aipei9i ohh1fuoQu3HeeZah2Esh5nungi8Eiruc
fash1ais3Dahr8AeTaequae8tahj4eeJ tae1ogha3ooyoqu4Eexiruk0Tah8fie4
ot5ahyaigei9ohshoothiuNeeth0laem Xohhee2cheiHohvohvaeg0Boov2theiy
autael5Emoochooqu4uRo7aigaewohzi hah8eil3oojaekaiQuae7Ar9phieFeix
thi4rei1ieNgeelohleowazai6laezah shiejoo2iepekeir9ahHeshah9aepae4
AeSho7uc5sha1foopaw9eihoh4aizoh8 pheisoo5aiteixeis4eigho7na7Ais2u
pi4Pah1tualuYeephooXie8AhNang1AG Ki8ooph8niez2aeC0yiur0The6jaZah4
wahNSA0haS1yOu5ijizifohD2Ieji6ie gah3phaiqu5aeghu4Ei6queeWei5phae
pheghe9rai6zohcaenguereiVuengaeX yohB4iu3aib2shohJoof5oof2hiz8Equ
iMoi6aixaehie2feechee1au3eayooHu ieniethohyoxiJaiTh6wo5LiTho1va5K
mahW3aaV9eyeb7vaelo6dahVui7AleoX ighaeNueFue2aigahpheuYeefaiLie1u
aerahT5aeg0aap8equ3dahphun4athoh deeg8leebooPaisie9ahv2ucai9oong2
shai3xooph8Ohwai2tur1eKaeDish0Sa uuKei5aethaiSher4Wooh7oaphies0wo
Uo5equoh5phee9beetod6phee5bohWae tumeyaeSu5paem6kohkoo4eu5ohghae3
oufaic4AhHuv8queiRopeishioVi1ega wae6IeRie0aighiek9iep7pi7ietee0u
kuhooBooW3zili0kee9aicheichohnge Keethuowa7ziB0iekoiLikei1Ahwie5a
eik6Faegh4kahnait8ve0cheithaed9S EecheeJ8rai5ech0ejeHahkooc2uhu9m
iiv8Geeg5ua1ot1yohv9eil7ueSeeth7 Teethee9zaibahbaimahjai3oJ0Aibei
uthai6UQua8eet6xook7ae8dane5XieK zee7fahHeiwooquiekiewi5laiwiek8e

If you like to reduce or increase the number of generated passwords you may define that in the second argument:

$ pwgen 32 2
zagee2phahfah4da2ooxeif6Taaz2ohy ieChiengooh7eez6aepoPhuk9upeipah

If you don’t depend on brain-memory you can use the -s flag to generate passwords from completely random characters

pwgen -s 32 2
DWqsuGX7LZH4eSNLlj0ic8gaOAaJpc4o 8qQ8JGDVwkHokeJuyZP3xHsz84GhSZVV

pwgen support various options to define password rules. For more information on that and all other options consult the pwgen(1) manpage


December 03, 2018

The Advent of Void: Day 3: ncdu

Even though disks are large and cheap, its still very nice to be able to track down what is using disk space in a graphical way. While there are many nice tools that do this for desktops, if you’re on a server or otherwise a remote connection, you’ll need a text-mode tool. This is where ncdu(1) comes in.

When launched ncdu scans the directories below the current working directory and displays an output of the relative filesizes.

ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help
--- /home/maldridge/Desktop/advent/ncdu ----------------------------------------
  777.0 MiB [##########]  hack3r5.divx
   24.0 MiB [          ]  plan_for_world_domination.tex
    8.0 MiB [          ] /secret_keys


 Total disk usage: 809.0 MiB  Apparent size: 809.0 MiB  Items: 4

Navigation is straight forward and the tree is very responsive since all the sizes are scanned at startup.

You can even delete files by pressing d while hovering on the file to delete:

ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help
--- /home/┌───Confirm delete─────────────────────────────────────────┐----------
          │ Are you sure you want to delete "backdoor.key"?          │
    8.0 Mi│                                                          │
          │                                                          │
          │              yes      no     don't ask me again          │
          └──────────────────────────────────────────────────────────┘
 Total disk usage:   8.0 MiB  Apparent size:   8.0 MiB  Items: 1