Linux sys-unconfig: Reconfigure the System Upon Next Boot

I can use unconfigure command on a previously configured Solaris Unix box and leave it in an unconfigured state. How do I unconfigure CentOS Linux OR RHEL 6.x on HP server. How do I reconfigure the system upon next boot?

You can use sys-unconfig command whoch provides a simple method of reconfiguring a system in a new environment. Upon executing sys-unconfig will halt your system, and run the following configuration programs at boot:

  1. Change the root password.
  2. Reconfigure networking / routing.
  3. Reconfigure time / date / time zone etc.
  4. Reconfigure Keyboard and mapping.
  5. Reconfigure system authentication resources.
  6. Reconfigure system runlevel.
  7. Reconfigure system services.

Type the following command as root user. Warning: do not type the following command on a production server for just testing purpose. The system will go down immediately:
# sys-unconfig
This command will create a file called /.unconfigured. The presence of this file will cause /etc/rc.d/rc.sysinit to run the programs mentioned above. Also, all persistent rules will be deleted from /etc/udev/rules.d/.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 4 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
4 comments… add one
  • s Modi May 22, 2014 @ 14:08

    How to do build Server from Clone?

    1. Modify /etc/hosts and /etc/sysconfig/network for new hostname.
    2. Modify /etc/sysconfig/network-scripts/ifcfg-eth*for MAC address and IP address.
    3. Also modify /etc/sysconfig/network-scripts/route-eth*
    4. Modify IP address in sshd_config.
    5. Run # sysctl kernel.hostname new_hostname
    6. Run sys-unconfig and reboot.
    7. Verify bb setup add new hostname on server itself and BBSERVER too.
    8. Verify auto.home, resolv.conf as per environment.
    9. Verify RHEL.repo and update patches as per environment.

    • M Kormendy May 31, 2014 @ 4:33

      S Modi, I just attempted your steps and they did not work.

  • Manikandan Aug 12, 2014 @ 22:27

    What is not working ?

    – make sure UUID is not used in fstab/eth scripts
    – remove MAC addr from eth scripts
    – rm /etc/udev/rules.d/70*net* file

  • Shlomit Jun 17, 2015 @ 11:09

    It’s work from CentOS 6 but not on CentOS 7.
    Is someone know why it’s not worked CentOS 7 ?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum