• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

nixos-rebuild Command Examples in Linux

by admin

“nixos-rebuild” is a command-line tool for reconfiguring a NixOS machine. NixOS is a Linux distribution that uses the Nix package manager, and “nixos-rebuild” allows users to make changes to the configuration of their NixOS system.

The tool provides a simple and convenient way to update and modify the configuration of a NixOS machine, and it allows users to make changes to system services, networking, security, and other settings. The tool also provides support for rolling back to previous configurations if necessary.

“nixos-rebuild” is an essential tool for NixOS users, and it provides a convenient and reliable way to manage the configuration of their system. The tool allows users to easily make changes to their system, and it provides a simple and intuitive interface for updating the configuration.

nixos-rebuild Command Examples

1. Build and switch to the new configuration, making it the boot default:

# nixos-rebuild switch

2. Build and switch to the new configuration, making it the boot default and naming the boot entry:

# nixos-rebuild switch -p {{name}}

3. Build and switch to the new configuration, making it the boot default and installing updates:

# nixos-rebuild switch --upgrade

4. Rollback changes to the configuration, switching to the previous generation:

# nixos-rebuild switch --rollback

5. Build the new configuration and make it the boot default without switching to it:

# nixos-rebuild boot

6. Build and activate the new configuration, but don’t make a boot entry (for testing purposes):

# nixos-rebuild test

7. Build the configuration and open it in a virtual machine:

# nixos-rebuild build-vm

Summary

In summary, “nixos-rebuild” is a tool for reconfiguring a NixOS machine. It provides a simple and convenient way to update and modify the configuration of a NixOS system, and it allows users to make changes to system services, networking, security, and other settings. The tool is an essential resource for NixOS users, and it provides a reliable and convenient way to manage the configuration of their system.

Filed Under: Linux

Some more articles you might also be interested in …

  1. fallocate: command not found
  2. “xfs_log_force: error 5 returned” – XFS Error (CentOS/RHEL 7)
  3. sed Command Examples in Linux
  4. eyeD3 Command Examples in Linux
  5. Medusa: command not found
  6. emerge Command Examples in Gentoo Linux
  7. lscpu Command Examples in Linux
  8. Linux Vs Windows – Why Linux Is Better For Programming & Web Dev
  9. iftop: command not found
  10. How To Open A Port In CentOS / RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright