How to change hostname without reboot in Vyatta

Last updated on February 7, 2013 by Dan Nanni

If you want to change the hostname of your Vyatta router (now renamed to VyOS), how will you do it? Considering the fact that Vyatta is derived from Debian distribution, you may be tempted to use a Debian way of changing hostname. That turns out to be not a right way to do it. Rather, you need to configure or change hostname via Vyatta's command line interface (CLI).

Follow this procedure to set the router's host name as well as domain name.

$ configure
$ set system host-name my_router_name
$ set system domain-name my_domain_name
$ commit
$ save
$ exit

The above commands will change the host name and domain name, and save the changes persistently in /config/config.boot. In addition, the changes will take effect immediately without rebooting. So you will see a new host name and domain name as soon as you log out and log in again.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean