EdgeOS中对“set”的补充是什么? (我如何检查EdgeRouter中的值?)

这个问题讨论了如何在EdgeRouter上运行的EdgeOS中设置gui和ssh侦听地址。 我想在进行更改之前检查当前的configuration,并学习将来检查其他设置的语法。

鉴于这个例子…

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

…在设置之前如何检查这些值? 我会认为,以下将工作…

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

运行help ,我看到以下…

 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> 

…然后按Tab让我这个…

 [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# 

我错过了什么? 我应该用show而不是set ? (和选项卡完成我的方式来讨论variables?)

你应该使用show ,等等,你可以看到一个configuration部分的整个图片(甚至完整的configuration,如果没有参数发出),而不只是特定的值:

 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]