Page MenuHomeVyOS Platform

Prompt not updated immediately after hostname change
Open, WishlistPublicBUG

Description

When changing the hostname and committing the changes, the shell prompt doesn't update immediately to reflect the new hostname. The prompt only changes after re-login. This behavior is particularly inconvenient in test and educational environments (like GNS3) where frequent hostname changes occur.

Steps to Reproduce:
  • Connect to VyOS CLI
  • Note current prompt (e.g., vyos@oldhostname:~$)
  • Execute: set system host-name newhostname
  • Execute: commit
  • Observe the prompt remains with the old hostname
Expected Behavior:

The shell prompt should update immediately after commit to show the new hostname (e.g., vyos@newhostname:~$) without requiring re-login.

Actual Behavior:

The prompt continues to show the old hostname until the user re-logs in.

Suggested Solution:
  • Update the prompt immediately after hostname change commit by refreshing the PS1 variable or triggering a prompt update mechanism.

Details

Version
1.4.2
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Harliff changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
Harliff updated the task description. (Show Details)

I have not tested this in the latest version (1.5), so please excuse me if the issue has already been fixed there.

Viacheslav triaged this task as Wishlist priority.Jun 16 2025, 7:33 PM