Skip to main content

VyOS Operation Notes

·
Table of Contents
⚠️ Note: Auto-translated Article
This page was generated by AI-assisted automatic translation from the original Japanese article.

VyOS Basics #

Notes on everyday VyOS operations, focusing on the most commonly used commands.

Two CLI Modes #

PromptModePurpose
$Operational ModeLinux OS operations and configuration display
#Configuration ModeApply, modify, and save configuration

Switching Modes #

TransitionCommandResult
Operational → ConfigurationconfigurePrompt changes to #
Configuration → OperationalexitPrompt changes to $

Key Operational Mode Commands #

CommandActionNotes
show configurationDisplay configurationTree format
show configuration commandsDisplay configurationCommand-line format
show versionShow version infoVyOS version, hardware, etc.
show XXXShow other statusUse show [TAB] to list subcommands
rebootReboot
configureEnter Configuration ModePrompt changes to #

Configuration Mode Command Basics #

CommandActionNotes
set XXXModify configurationChanges are staged (pending)
delete XXXDelete specific configurationChanges are staged (pending)
show XXXXDisplay configurationIncludes pending changes
commitApply changesApplies all staged changes
saveSaveSaves to startup configuration
run XXXXXRun operational command XXXXExecutes without leaving config mode
Example: run show configuration commands
rollback NRoll back N commitsN=0 or more
Use run show system commit to list commit numbers
exitReturn to Operational ModePrompt changes to $

VyOS Upgrade #

Rolling Release upgrade procedure — run in Operational Mode.

Pre-Update Check #

Check the current VyOS version.

$ show version↵
Version:          VyOS 1.4-rolling-202302080317
Release train:    current

Built by:         [email protected]
Built on:         Wed 08 Feb 2023 03:17 UTC
Build UUID:       ce4d9361-2f83-44a1-88f4-488f1aa20f02
Build commit ID:  8cade9112a16ed

Architecture:     x86_64
Boot via:         installed image
System type:      VMware guest

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 04 e6 47 10 ac 81 be-db c7 bc e8 e2 87 ba 2b
Hardware UUID:    47e60442-ac10-be81-dbc7-bce8e287ba2b

Copyright:        VyOS maintainers and contributors

Check the current installed image version.

$ show system image↵
The system currently has the following image(s) installed:

   1: 1.4-rolling-202302080317 (default boot) (running image)

Check the VyOS nightly builds page to see if a new release is available. Copy the URL of the latest ISO file and paste it into the command below. Press [Enter] for all prompts.

$ add system image https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/1.X-rolling-YYYYMMDDnnnn/vyos-1.X-rolling-YYYYMMDDnnnn-amd64.iso↵
Trying to fetch ISO file from https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/1.X-rolling-YYYYMMDDnnnn/vyos-1.X-rolling-YYYYMMDDnnnn-amd64.iso...
Downloading...
The file is 434.000 MiB.
[############################################################################################################] 100%
Download complete.
Done.
Checking for digital signature file...
Downloading...
(abbreviated)
Do you want to continue without signature check? (yes/no) [yes] 
Checking SHA256 checksums of files on the ISO image... OK.
Done!
What would you like to name this image? [1.X-rolling-YYYYMMDDnnnn]: 
OK.  This image will be named: 1.X-rolling-YYYYMMDDnnnn
Installing "1.X-rolling-YYYYMMDDnnnn" image.
Copying new release files...
Would you like to save the current configuration
directory and config file? (Yes/No) [Yes]: 
Copying current configuration...
Would you like to save the SSH host keys from your
current configuration? (Yes/No) [Yes]: 
Copying SSH keys...
Running post-install script...
Setting up grub configuration...
Done.

Verify that the downloaded image is ready.

$ show system image↵
The system currently has the following image(s) installed:

  1: 1.4-rolling-202302110748 (default boot)
  2: 1.4-rolling-202302080317 (running image)

Reboot.

$ reboot↵
Are you sure you want to reboot this system? [y/N] y↵

Reconnect via SSH after the reboot completes.

Verify the VyOS version and image state after boot.

$ show version↵
Version:          VyOS 1.4-rolling-202302110748
Release train:    current

Built by:         [email protected]
Built on:         Sat 11 Feb 2023 07:48 UTC
Build UUID:       f3c3ece9-fd81-44a7-835e-ddf75a0c11f9
Build commit ID:  6d90ea4912b158

Architecture:     x86_64
Boot via:         installed image
System type:      VMware guest

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 04 e6 47 10 ac 81 be-db c7 bc e8 e2 87 ba 2b
Hardware UUID:    47e60442-ac10-be81-dbc7-bce8e287ba2b

Copyright:        VyOS maintainers and contributors

Post-Update Check #

If IPsec connections are defined, verify they have recovered after the update.

$ show vpn ipsec sa↵

Remove Old Version #

Once operation is confirmed, delete the old image. Specify the unused image name shown by show system image.

$ delete system image 1.4-rolling-202302080317↵
Are you sure you want to delete the
"1.4-rolling-202302080317" image? (Yes/No) [No]: Yes↵
Deleting the "1.4-rolling-202302080317" image...
Done

Confirm deletion is complete with the image list.

$ show system image↵
The system currently has the following image(s) installed:

   1: 1.4-rolling-202302110748 (default boot) (running image)

References #

Official documentation: