Page MenuHomeVyOS Platform

Is there a comprehensive list of all VyOS commands?
Closed, ResolvedPublic

Asked by max1e6 on Jul 9 2017, 10:00 AM.

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

max1e6
Updated 2,631 Days Ago

OK. Got that.

More specifically, where can I look in the VyOS source code for all the commands available?

mickvav
Updated 2,595 Days Ago

There are 3 sets of commands -

  1. General linux executables, that can be run.
  2. bash functions/aliases/internal functions
  3. 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.

carl.byington
Updated 2,518 Days Ago

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.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.