Details
Is there a comprehensive list of all the VyOS commands? Where in the code would I find this?
My intention is to create a command reference for the wiki.
Answers
There are 3 sets of commands -
- General linux executables, that can be run.
- bash functions/aliases/internal functions
- vyos-specific commands (which are actualy also bash functions)
Default vyos vbash will show you starts of 3) on Tab-Tab in terminal with some comments (the exact list is modal and depends on whether you are in configuration or operational mode). The list is created by bash-completition-alike scripts, analising contents of /opt/vyatta/share folder, so you can inspect it to get understanding of which commands are available and what kind of arguments they expect (you have to look into node.def files on those commands). See comment of @UnicronNL above.
This is valid for running system.
For sources tree, you have to fetch all git submodules and do
find -name "node.def"
in resulting (huge) source tree.
After cleaning certain prefixes, you will get the (long!) list of commands. I've did it once, got something about 3000 commands and wondered, what to do with all that stuff :)
To get list of 1) you can issue something like
ls ${PATH//:/ }
(but be prepare to read a long list. You can find usefull info in man for some commands or by executing the command whith --help option)
To get list of 2) you can look on output of
declare -F help
By typing, say,
help for
you will get bash's help for it's internal "for" operator.
https://www.five-ten-sg.com/mapper/vyos/commands
I have a script that parses all the node.def files from a running system to generate that page, but it was over two years old and there have been many changes since then. I just regenerated that from a running Vyos 1.2 system.