Ubuntu vs. NixOS: Difference between revisions

imported>Skylark
m Ubuntu vs. NixOS: Where are packages installed? - missing "in"
Vater (talk | contribs)
see also added
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Wide page}}
<!-- TODO''': Provide well-commented sample configuration.nix and ~/.nixpkgs/config.nix files with examples of common tasks. -->


== Ubuntu vs. NixOS ==
The system-wide column is the equivalent of using <code>apt</code> under Ubuntu.
<!-- TODO''': Provide well-commented sample configuration.nix and ~/.nixpkgs/config.nix files with examples of common tasks. -->
<div class="table-responsive">
<div class="table-responsive">
{| class="wikitable"
{| class="wikitable"
Line 106: Line 102:
|<syntaxhighlight lang="console">$ sudo apt-get update</syntaxhighlight>
|<syntaxhighlight lang="console">$ sudo apt-get update</syntaxhighlight>
|<syntaxhighlight lang="console">$ sudo nix-channel --update</syntaxhighlight>
|<syntaxhighlight lang="console">$ sudo nix-channel --update</syntaxhighlight>
|<syntaxhighlight lang="console">$nix-channel --update</syntaxhighlight>
|<syntaxhighlight lang="console">$ nix-channel --update</syntaxhighlight>
|-
|-
|Upgrade packages
|Upgrade packages
Line 164: Line 160:
|Install a particular version of a package
|Install a particular version of a package
|<syntaxhighlight lang="console">$ apt-get install package=version</syntaxhighlight>
|<syntaxhighlight lang="console">$ apt-get install package=version</syntaxhighlight>
|Although Nix on its own doesn't understand the concept of package versioning, you can install and play with older (or newer!) software via https://nixos.wiki/wiki/FAQ/Pinning_Nixpkgs with https://lazamar.co.uk/nix-versions.
|Although Nix on its own doesn't understand the concept of package versioning, you can install and play with older (or newer!) software via [[FAQ/Pinning Nixpkgs]] with https://lazamar.co.uk/nix-versions.




Line 292: Line 288:
|Install dpkg with Nix, then <syntaxhighlight lang="bash">dpkg -i package.deb</syntaxhighlight> While this is technically possible it will in all likelihood not work.
|Install dpkg with Nix, then <syntaxhighlight lang="bash">dpkg -i package.deb</syntaxhighlight> While this is technically possible it will in all likelihood not work.
|}
|}
</div>


</div>
== See also ==
 
* [[Cheatsheet]]
* https://nixcademy.com/cheatsheet/
** https://nixcademy.com/downloads/cheatsheet.pdf


[[Category:Cookbook]]
[[Category:Cookbook]]