105 lines
2.9 KiB
Markdown
105 lines
2.9 KiB
Markdown
# pwgen
|
|
|
|
## Introduction
|
|
`pwgen` is a CLI for generating random passwords of varying length and content.
|
|
|
|
## Installation
|
|
|
|
### Arch Based Systems
|
|
|
|
#### With an AUR Manager
|
|
|
|
If you are using an arch based system, you can install the `pwgen` package from the [AUR](https://aur.archlinux.org/) (Arch User Repository).
|
|
(Not yet available!)
|
|
|
|
An AUR manager like `yay` may be used for an easy installation:
|
|
|
|
```shell
|
|
$ yay -S pwgen
|
|
```
|
|
#### Without an AUR manager
|
|
|
|
If you do not want to use an AUR manager, here is how to compile and install the package manually:
|
|
|
|
Download the `PKGBUILD` file from this repository or from the pwgen AUR site and move it to some folder.
|
|
|
|
Navigate into this folder using:
|
|
|
|
```shell
|
|
$ cd path-to-the-folder
|
|
```
|
|
|
|
Now use the `makepkg` command to download the source files and compile the package:
|
|
|
|
```shell
|
|
$ makepkg
|
|
```
|
|
|
|
After you are done creating the package, you should have many files including a `.pkg.tar.zst` archive.
|
|
This is your compressed ready to use pwgen package, which can now be installed using `pacman`.
|
|
|
|
```shell
|
|
$ sudo pacman -U path-to-your-archive
|
|
```
|
|
|
|
The folder and its contents used for the installation process may now be deleted.
|
|
|
|
### Other Systems (PKGBUILD file is not used)
|
|
A `dpkg-buildpackage` file might be added at some point, but for now the installation must be done manually.
|
|
|
|
Make sure `git` is installed on your system.
|
|
First clone the source files from this git repository:
|
|
|
|
```shell
|
|
$ git clone https://git.kske.dev/DieGurke/pwgen.git
|
|
```
|
|
|
|
Navigate into the folder using:
|
|
|
|
```shell
|
|
$ cd pwgen/
|
|
```
|
|
|
|
Now copy the shell script into the `/usr/bin/` folder on your system:
|
|
|
|
```shell
|
|
$ sudo cp pwgen.sh /usr/local/bin/pwgen
|
|
```
|
|
|
|
Now the `README.md` and the `LICENSE` files have to be copied to the appropriate folders on your system:
|
|
|
|
```shell
|
|
$ sudo mkdir /usr/share/doc/pwgen
|
|
$ sudo cp README.md /usr/share/doc/pwgen/README.md
|
|
|
|
$ sudo mkdir /usr/share/licenses/pwgen
|
|
$ sudo cp LICENSE /usr/share/licenses/pwgen/LICENSE
|
|
```
|
|
|
|
pwgen is now installed on your system, thus the folder you are in right now used for the installation might be deleted.
|
|
|
|
## Usage
|
|
pwgen is very easy to use:
|
|
|
|
The general command structure for generating passwords is as follows:
|
|
|
|
```
|
|
$ pwgen [length] [mode]
|
|
```
|
|
|
|
Please note that the `mode` argument can be empty, in which case it is defaulted to `full`.
|
|
|
|
If you just enter `pwgen` into the console, the program will provide you with information about the usage and further explanation on what modes are available.
|
|
|
|
```
|
|
Usage: pwgen [length] [mode]
|
|
|
|
Available modes:
|
|
numbers Generates password containing only numbers
|
|
lower Generates password containing only lower letters
|
|
upper Generates password containing only upper letters
|
|
letters Generates password containing only letters
|
|
letters-numbers Generates password containing only letters and ners
|
|
full Generates password containing letters, numbers and symbols
|
|
```
|