How to change hostname without reboot in Vyatta

If you want to change the hostname of your Vyatta router, 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
$ 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.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

Leave a comment

Your email address will not be published. Required fields are marked *