差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
nix [2017/01/09 05:16] jz |
nix [2017/05/28 19:12] (目前版本) jz |
||
---|---|---|---|
行 1: | 行 1: | ||
====== Nix ====== | ====== Nix ====== | ||
- | ===== select channel ===== | + | ===== Select channel ===== |
<code bash> | <code bash> | ||
行 8: | 行 8: | ||
</code> | </code> | ||
- | ===== search package ===== | + | ===== Search package ===== |
<code bash> | <code bash> | ||
nix-env -qa PACKAGE_NAME | nix-env -qa PACKAGE_NAME | ||
行 15: | 行 15: | ||
</code> | </code> | ||
- | ===== install package ===== | + | ===== Install package ===== |
<code bash> | <code bash> | ||
- | nix-env -iA PACKAGE_NAME | + | nix-env -i PACKAGE_NAME |
</code> | </code> | ||
- | ===== list installed package ===== | + | ===== Remove package ===== |
+ | <code bash> | ||
+ | nix-env -e PACKAGE_NAME | ||
+ | # same as nix-env --uninstall PACKAGE_NAME | ||
+ | </code> | ||
+ | |||
+ | ===== Garbage collection ===== | ||
+ | <code bash> | ||
+ | nix-collect-garbage -d | ||
+ | </code> | ||
+ | |||
+ | ===== List installed package ===== | ||
<code bash> | <code bash> | ||
nix-env -q | nix-env -q | ||
</code> | </code> | ||
+ | ===== Rebuild ===== | ||
+ | <code bash> | ||
+ | vi /etc/nixos/configuration.nix | ||
+ | nixos-rebuild switch | ||
+ | nix-env --list-generations | ||
+ | </code> | ||
**ref:** | **ref:** | ||
行 31: | 行 48: | ||
https://nixos.org/wiki/Cheatsheet | https://nixos.org/wiki/Cheatsheet | ||
+ | |||
+ | https://distrowatch.com/dwres.php?resource=package-management |