]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/debian/README.md
...
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / debian / README.md
1 # debian
2
3 This plugin provides Debian-related aliases and functions for zsh.
4
5 To use it add `debian` to the plugins array in your zshrc file.
6
7 ```zsh
8 plugins=(... debian)
9 ```
10
11 ## Settings
12
13 - `$apt_pref`: use aptitude or apt if installed, fallback is apt-get.
14 - `$apt_upgr`: use upgrade or safe-upgrade (for aptitude).
15
16 Set `$apt_pref` and `$apt_upgr` to whatever command you want (before sourcing Oh My Zsh) to override this behavior.
17
18 ## Common Aliases
19
20 | Alias  | Command                                                                | Description                                                |
21 | ------ | ---------------------------------------------------------------------- | ---------------------------------------------------------- |
22 | `age`  | `apt-get`                                                              | Command line tool for handling packages                    |
23 | `api`  | `aptitude`                                                             | Same functionality as `apt-get`, provides extra options    |
24 | `acs`  | `apt-cache search`                                                     | Command line tool for searching apt software package cache |
25 | `aps`  | `aptitude search`                                                      | Searches installed packages using aptitude                 |
26 | `as`   | `aptitude -F '* %p -> %d \n(%v/%V)' --no-gui --disable-columns search` | Print searched packages using a custom format              |
27 | `afs`  | `apt-file search --regexp`                                             | Search file in packages                                    |
28 | `asrc` | `apt-get source`                                                       | Fetch source packages through `apt-get`                    |
29 | `app`  | `apt-cache policy`                                                     | Displays priority of package sources                       |
30
31 ## Superuser Operations Aliases
32
33 | Alias    | Command                                                                               | Description                                                                                 |
34 | -------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
35 | `aac`    | `sudo $apt_pref autoclean`                                                            | Clears out the local repository of retrieved package files                                  |
36 | `aar`    | `sudo $apt_pref autoremove`                                                           | Removes packages installed automatically that are no longer needed                          |
37 | `abd`    | `sudo $apt_pref build-dep`                                                            | Installs all dependencies for building packages                                             |
38 | `ac`     | `sudo $apt_pref clean`                                                                | Clears out the local repository of retrieved package files except lock files                |
39 | `ad`     | `sudo $apt_pref update`                                                               | Updates the package lists for upgrades for packages                                         |
40 | `adg`    | `sudo $apt_pref update && sudo $apt_pref $apt_upgr`                                   | Update and upgrade packages                                                                 |
41 | `ads`    | `sudo apt-get dselect-upgrade`                                                        | Installs packages from list and removes all not in the list                                 |
42 | `adu`    | `sudo $apt_pref update && sudo $apt_pref dist-upgrade`                                | Smart upgrade that handles dependencies                                                     |
43 | `afu`    | `sudo apt-file update`                                                                | Update the files in packages                                                                |
44 | `ai`     | `sudo $apt_pref install`                                                              | Command-line tool to install package                                                        |
45 | `ail`    | `sed -e 's/ */ /g' -e 's/ *//' \| cut -s -d ' ' -f 1 \| xargs sudo $apt_pref install` | Install all packages given on the command line while using only the first word of each line |
46 | `alu`    | `sudo apt update && apt list -u && sudo apt upgrade`                                  | Update, list and upgrade packages                                                           |
47 | `ap`     | `sudo $apt_pref purge`                                                                | Removes packages along with configuration files                                             |
48 | `au`     | `sudo $apt_pref $apt_upgr`                                                            | Install package upgrades                                                                    |
49 | `di`     | `sudo dpkg -i`                                                                        | Install all .deb files in the current directory                                             |
50 | `dia`    | `sudo dpkg -i ./*.deb`                                                                | Install all .deb files in the current directory                                             |
51 | `kclean` | `sudo aptitude remove -P ?and(~i~nlinux-(ima\|hea) ?not(~n$(uname -r)))`              | Remove ALL kernel images and headers EXCEPT the one in use                                  |
52
53 ## Aliases - Commands using `su`
54
55 | Alias | Command                                                   |
56 | ----- | --------------------------------------------------------- |
57 | `aac` | `su -ls "$apt_pref autoclean" root`                       |
58 | `aar` | `su -ls "$apt_pref autoremove" root`                      |
59 | `ac`  | `su -ls "$apt_pref clean" root`                           |
60 | `ad`  | `su -lc "$apt_pref update" root`                          |
61 | `adg` | `su -lc "$apt_pref update && aptitude $apt_upgr" root`    |
62 | `adu` | `su -lc "$apt_pref update && aptitude dist-upgrade" root` |
63 | `afu` | `su -lc "apt-file update"`                                |
64 | `au`  | `su -lc "$apt_pref $apt_upgr" root`                       |
65 | `dia` | `su -lc "dpkg -i ./*.deb" root`                           |
66
67 ## Miscellaneous Aliases
68
69 | Alias     | Command                                        | Description                    |
70 | --------- | ---------------------------------------------- | ------------------------------ |
71 | `allpkgs` | `aptitude search -F "%p" --disable-columns ~i` | Display all installed packages |
72 | `mydeb`   | `time dpkg-buildpackage -rfakeroot -us -uc`    | Create a basic .deb package    |
73
74 ## Functions
75
76 | Function            | Description                                                     |
77 | ------------------- | --------------------------------------------------------------- |
78 | `apt-copy`          | Create a simple script that can be used to 'duplicate' a system |
79 | `apt-history`       | Displays apt history for a command                              |
80 | `apt-list-packages` | List packages by size                                           |
81 | `kerndeb`           | Builds kernel packages                                          |
82
83 ## Authors
84
85 - [@AlexBio](https://github.com/AlexBio)
86 - [@dbb](https://github.com/dbb)
87 - [@Mappleconfusers](https://github.com/Mappleconfusers)