0

This question discusses how to set the gui and ssh listening addresses in EdgeOS running on an EdgeRouter. I'd like to check my current configuration before making a change, as well as learn the syntax for checking other settings in the future.

Given this example...

configure
set service gui listen-address 10.0.0.1
set service ssh listen-address 10.0.0.1
commit
save
exit

... how would I check those values before setting them? I would think that the following would work...

configure
check service gui listen-address 10.0.0.1
check service ssh listen-address 10.0.0.1
exit

Running help, I see the following...

root@ubnt# help
GNU bash, version 4.1.0(2)-release (mipsel-unknown-linux-gnu)
These shell commands are defined internally.  Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.

A star (*) next to a name means that the command is disabled.

 job_spec [&]                            if COMMANDS; then COMMANDS; [ elif C>
 (( expression ))                        kill [-s sigspec | -n signum | -sigs>
 . filename [arguments]                  let arg [arg ...]
 :                                       local [option] name[=value] ...
 [ arg... ]                              logout [n]
 [[ expression ]]                        mapfile [-n count] [-O origin] [-s c>
 alias [-p] [name[=value] ... ]          popd [-n] [+N | -N]
 bind [-lpvsPVS] [-m keymap] [-f filen>  printf [-v var] format [arguments]
 break [n]                               pushd [-n] [+N | -N | dir]
 builtin [shell-builtin [arg ...]]       pwd [-LP]
 caller [expr]                           read [-ers] [-a array] [-d delim] [->
 case WORD in [PATTERN [| PATTERN]...)>  readarray [-n count] [-O origin] [-s>
 cd [-L|-P] [dir]                        readonly [-af] [name[=value] ...] or>
 command [-pVv] command [arg ...]        return [n]
 compgen [-abcdefuv] [-o option]  >  select NAME [in WORDS ... ;] do COMM>
 complete [-abcdefuv] [-pr] [-DE] >  set [--abefhkmnptuvxBCHP] [-o option>
 compopt [-o|+o option] [-DE] [name ..>  shift [n]
 continue [n]                            shopt [-pqsu] [-o] [optname ...]
 coproc [NAME] command [redirections]    source filename [arguments]
 declare [-aAfFilrtux] [-p] [name[=val>  test [expr]
 dirs [-clpv] [+N] [-N]                  time [-p] pipeline
 echo [-neE] [arg ...]                   times
 enable [-a] [-dnps] [-f filename] [na>  trap [-lp] [[arg] signal_spec ...]
 eval [arg ...]                          true
 exec [-cl] [-a name] [command [argume>  type [-afptP] name [name ...]
 exit [n]                                typeset [-aAfFilrtux] [-p] name[=val>
 export [-fn] [name[=value] ...] or ex>  ulimit [-SHacdefilmnpqrstuvx] [limit>
 false                                   umask [-p] [-S] [mode]
 fc [-e ename] [-lnr] [first] [last] o>  unalias [-a] name [name ...]
 for NAME [in WORDS ... ] ; do COMMAND>  unset [-f] [-v] [name ...]
 for (( exp1; exp2; exp3 )); do COMMAN>  until COMMANDS; do COMMANDS; done
 function name { COMMANDS ; } or name >  variables - Names and meanings of so>
 getopts optstring name [arg]            wait [pid]
 hash [-lr] [-p pathname] [-dt] [name >  while COMMANDS; do COMMANDS; done
 help [-dms] [pattern ...]               { COMMANDS ; }
 history [-c] [-d offset] [n] or histo>

... and pressing Tab gets me this...

[edit]
root@ubnt#
comment         copy            load            run
commit          delete          loadkey         save
commit-confirm  discard         merge           set
compare         edit            rename          show
confirm         exit            rollback
[edit]
root@ubnt#

What am I missing? Should I use show instead of set? (And tab-complete my way to the variable in question?)

  • To complete the details here, I had some confusion about commit and save ... this tutorial answered those questions. – user3.1415927 Sep 23 '17 at 0:01
1

You should use show, and more to it, you could see an entire picture for a config section with it (or even complete configuration, if issued without parameters), not just particular value:

admin@maya:~$ configure
[edit]
admin@maya# show service dns
 forwarding {
     cache-size 150
     listen-on eth0
     listen-on eth0.10
 }
[edit]
admin@maya# show service d
dhcp-server  dns
[edit]
admin@maya# show service dns forwarding cache-size
 cache-size 150
[edit]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.