Improved command completion

As some who is familiar with linux system administration, i am used to using the “w” command to see who is logged in, uptime of the machine and load of the machine

ubnt@rtr-1:~$ w
19:00:18 up 41 days, 15:02, 0 users, load average: 0.15, 0.21, 0.18

To my surprise in the latest/greatest vyos 1.4 that is not the case.
w in vbash is somehow command completed to “wake-on-lan”

vyos@rtr-1:~$ w
Incomplete command: wake-on-lan

My request is that with command completion, if there is an existing command available in $PATH that should be executed before auto completion to a longer internal defined command.

So when i type “w” it would find /usr/bin/w and use that before autocompletion to “wake-on-lan”

For me VyOS is primarily an Internetworking Operating System with an underlying Linux OS and not the other way around. VyOS commands should be auto-complete prioritized over native OS commands.


Hi @fromport - Welcome to the Vyos forums.

I also agree with @Netboy3. The fact that Vyos is based on Debian isn’t really meant to be exposed to the user - you should feel you’re inside a router, not a Linux shell.

This is the same as how a Juniper Network’s router operates. It’s got FreeBSD roots and you can drop to a FreeBSD based shell if you need to, but by default you’re in the Juniper CLI which doesn’t even allow access to FreeBSD shell commands.

It’s understandable if you’ve come from a heavy Linux/Unix background what you’d want this, but I hope you understand why that’s not the choice the developers have made.

1 Like

To me when you are in the regular or configuration mode then VyOS internal commands should be the first option.

But once I leave this environment and go for the OS shell by “sudo bash” then bash should use the linux path and linux commands first for command/tab-completion.

You can use sudo

vyos@r14:~$ sudo w
 12:54:15 up  1:52,  2 users,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
vyos     pts/0    11:02    7.00s  0.20s   ?    sudo w
vyos     pts/1    12:54    0.00s  0.00s   ?    sudo w

Don’t think that we should change anything not in VyOS CLI
If you have a solution, create a feature request on

this behavior has changed:
Vyos 1.1.8

Welcome to VyOS
Linux vyatta 3.13.11-1-amd64-vyos #1 SMP Sat Nov 11 12:10:30 CET 2017 x86_64
Welcome to VyOS.
This system is open-source software. The exact distribution terms for
each module comprising the full system are described in the individual
files in /usr/share/doc/*/copyright.
Last login: Tue Jul 4 01:05:51 2023
vyos@vyos:~$ w
01:07:56 up 2 min, 2 users, load average: 0.01, 0.01, 0.01
vyos tty1 01:05 1:16 0.25s 0.14s vbash
vyos pts/0 orville 01:07 4.00s 0.07s 0.00s w
vyos@vyos:~$ show version
Version: VyOS 1.1.8
Description: VyOS 1.1.8 (helium)
Copyright: 2017 VyOS maintainers and contributors
Built by:
Built on: Sat Nov 11 13:44:36 UTC 2017
Build ID: 1711111344-b483efc
System type: x86 64-bit
Boot via: image
Hypervisor: KVM
HW model: Standard PC (i440FX + PIIX, 1996)
HW S/N: Not Specified
HW UUID: 833E60F8-FDE9-9042-917D-B2732DB0F02D
Uptime: 01:08:13 up 2 min, 2 users, load average: 0.01, 0.01, 0.01

and here is where it changed:
Vyos 1.2.6

vyos@vyos:~$ show version
Version: VyOS 1.2.6
Release Train: crux
Built by:
Built on: Wed 23 Sep 2020 13:21 UTC
Build UUID: 6c923469-b0f4-4ebc-9d1a-c364be3c7517
Build Commit ID: 706d01f247bb83
Architecture: x86_64
Boot via: installed image
System type: KVM guest
Hardware vendor: QEMU
Hardware model: Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID: 6d032c5a-4e65-4614-99c2-70a38c162570
Copyright: VyOS maintainers and contributors
vyos@vyos:~$ w
Incomplete command: wake-on-lan

unix commands like ip still work, that is not rerouted to some exclusive vyos command.
I would like to reconsider if the wake-on-lan command could/should be auto command completed to wa or something.